I installed java downloading the relative file from the Oracle site, and following the manual guide I found on http://wiki.ubuntu-it.org . I have it and it works.

Now I'm trying using javadoc with the following command:

$ javadoc -version -private -d /tmp/Docs -sourcepath src -subpackages it

But I receive this error message:

The program 'javadoc' can be found in the following packages:
 * default-jdk
 * gcj-5-jdk
 * openjdk-8-jdk-headless
 * gcj-4.8-jdk
 * gcj-4.9-jdk
 * openjdk-9-jdk-headless
Try: sudo apt install <selected package>

As I already installed java, how should I proceed to get javadoc too? I'm afraid any of the packages suggested could result in some problems as I already have a jdk.

Note: I would prefer not to use openjdk.

  • Java isn't JDK. For javadoc, you need a JDK installed. From your question, you don't already have a JDK installed. – TheWanderer Oct 9 '16 at 14:42

The only way to get javadocs is to install a JRE or a JDK. If you picked one that did not have javadoc you will need to install one that does.

No way around it.

| improve this answer | |

Alternative way is to install javadoc via npm: https://www.npmjs.com/package/javadoc

$ npm install -s javadoc
+ javadoc@1.0.6
added 235 packages from 100 contributors and audited 81 packages in 8.795s
found 0 vulnerabilities

$ javadoc --version
javadoc 12.0.1
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.