Ubuntu – How to install only javadoc


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.

Best Answer

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.

Related Question