emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] Possible Outdated Documentation, Possible Bug. "Can't compile a ja


From: uruseiiyatsura
Subject: [BUG] Possible Outdated Documentation, Possible Bug. "Can't compile a java block without a classname." Org-babel babel java
Date: Wed, 22 Sep 2021 02:06:18 +0000

  Java Source Code Blocks in Org Mode says the following:
    
"It is not necessary to include the class statement or define a main method. ob-java will wrap a source code block in boilerplate class and main method definitions if they are omitted. If :classname and the class definition in the source code block are both omitted, the class will be named Main."

The following example is provided:

#+begin_src java :results output
  System.out.print("hello, world");
#+end_src

This returns error "can't compile a java block without a classname." This contradicts the documentation.

This has been duplicated on Gentoo and Ubuntu 20.04 in Emacs version 27.2. org version 9.4.4, 9.4.6 and 26.3 9.1.9 using the following .emacs.el:

(require 'org)
(org-babel-do-load-languages
'org-babel-load-languages
'(
(java . t)
))


The documentation appears to be outdated or misleading, or missing some crucial piece of information that a newbie needs to be aware of. Please advise on whether this is a bug and how to fix it. I am new to using the mailing list.

Upgrading to 9.4.6 did not fix this



reply via email to

[Prev in Thread] Current Thread [Next in Thread]