I'm here again with a docs question. At my university, when using Eclipse, when placing the cursor over a Java API method name (for example: .size() ), I get very nice documentation about it.
Here at home I get
Note: This element neither has attached source nor attached Javadoc
and hence no information could be found.
Any quick and simple apt-get fix? Thanks in advance!!!!
To see the javadoc of a class having attached source in eclipse: select Window -> show view -> javadoc (or alt + shift + q, j). then in the javadoc view, right click -> open attached javadoc (or shift + F2), this will display the javadoc of the class in the internal browser of eclipse.
The documentation you are looking for is in /usr/share/doc/libguava-java/api/ . Most (all?) packages install documentation into /usr/share/doc/packages-name . If you're ever unsure what was installed by a package, you can run dpkg -L package-name to get a list of files that were included.
From the main menu, select Tools | Generate JavaDoc. In the dialog that opens, select a scope — a set of files or directories for which you want to generate the reference, and set the output directory where the generated documentation will be placed.
Select the desired package, class or method name, right-click and select Show Javadoc. This will launch your default web browser and navigate to the Javadoc for the selected item.
Go to your JRE settings (Window > Preferences > Java > Installed JREs), select your current, then Edit it and set the Source Attachment for rt.jar
.
You might have to install the sun-java6-source
or openjdk-6-source
packages depending on what you are using.
For the Sun JVM, sources will end up in /usr/lib/jvm/java-6-sun-1.6.0.15/src.zip
.
PS: I'd suggest to use Sun JDK and to set it as default with sudo update-alternatives --config java
but this is more a side note.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With