4

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.

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

3 Answers 3

1

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.

0

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

$ npm install -s javadoc
+ [email protected]
added 235 packages from 100 contributors and audited 81 packages in 8.795s
found 0 vulnerabilities

$ javadoc --version
javadoc 12.0.1
1
0

For me apt install openjdk-16-jdk-headless worked for # version 16.0.1+9-1~20.04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .