Alex Rivera | Logout

Missing basic JavaDoc in Eclipse

Asked 2012-04-04T04:08:13.040
14

Up to a few days ago, Eclipse was working fine in locating the javadoc for base classes such as Java.io.File. Recently, though, hovering over these classes only yields a message indicating that the source and javadoc are missing:

"Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc."

I couldn't for the life of me locate the option that would let me reselect the location of the basic documentation. Does anyone know how to fix this?

Edit
Report

2 Answers

12

Expand your JRE System library and find rt.jar (classes.jar for Mac OS X). Right click, and select 'Properties'.

classes.jar

You can then specify the Javadoc location (as well as the source location).

properties

answered 2012-04-04T04:14:23.660
4

Press ctrl+click (or command+click if you're on a Mac) on any method which doesn't have javadocs. For example, in this line:

System.out.println();

... assuming that no javadocs are available for println, control-clicking on println will open a new tab with a button labeled "Attach Source...". And that's it!

answered 2012-04-04T04:13:53.277

Your Answer