Cody Woolsey
Cody Woolsey

Reputation: 131

Javadoc never showing in eclipse

Whenever I try to access the Javadoc for any class in Eclipse by hovering over a reference to it, it either says An exception occurred while getting the Javadoc or This element has no attached source and the Javadoc could not be found in the attached Javadoc. I've read through several solutions on StackOverflow and have tried them all including:

The weird thing is, if I click on View Javadoc in Browser it opens directly to the correct Javadoc.

Log File from my latest session in Eclipse Both Libraries in Project Location is Likely Valid.

Upvotes: 1

Views: 414

Answers (2)

Chinmoy
Chinmoy

Reputation: 1446

Windows->Preferences -> Installed JRE -> click on the JDK ->JRE Deifination will open -> In RT.JAR attach java source as shown below:

enter image description here

Upvotes: 1

Tom
Tom

Reputation: 17567

As you can see in the exception message, Eclipse is currently using the JRE instead of the JDK, since it is set up as the primary one (according to the second screenshot). Remove the JRE library from the project, you don't need it anymore. The JDK contains everything you need, including the JavaDoc.

Upvotes: 0

Related Questions