Javadoc not available in Eclipse

19,882

Solution 1

enter image description here

In Eclipse, go to Window, Preferences, and navigate to the javadoc options or type javadoc where it says 'type filter text'. Check if the options 'Process Javadoc comments' is checked. It may ask you to do a full rebuild of your projects after you check/uncheck that option.

Solution 2

Had the same problem with Eclipse Mars (4.5.1). I needed to assign the Source attachment of rt.jar to the src.zip manually:

  • Navigate to your project's property page: Project > Properties > Java Build Path > JRE System Library > rt.jar > Source attachment.
  • Click Edit..., choose External location and put the path to src.zip here.

Solution 3

You seem to be developing an Android App in Eclipse. When you have the ADT plugins installed you are no longer using the standard Java JDKs, but rather the android versions.

To fix this you'll want to Install "Documentation for Android SDK" package using Android SDK and AVD Manager. This will place the documentation folder into the android sdk location suitable for eclipse + the ADT plugins to supply you javadoc help popups.

Share:
19,882
adityag
Author by

adityag

Updated on June 05, 2022

Comments

  • adityag
    adityag almost 2 years

    I am using Eclipse IDE for Java Developers

    Version: Helios Service Release 2 Build id: 20110218-0911

    I have a problem similar to this stackoverflow question

    On reading other questions, I have found that the error

    This element has no attached source and the Javadoc could not be found in the attached Javadoc

    is caused by Eclipse not being able to locate the javadoc file.

    I checked, I have both JDK and JRE in c program files / java location. I have src.zip file at C:\Program Files\Java\jdk1.6.0_30, I have src lib file at C:/Program Files/Java/jre6/lib/rt.jar

    Both these paths are set in classpath variables.

    Installed JRE is referring to C:\Program Files\Java\jre6 and javadoc location for all JRE system libraries is set to http://java.sun.com/javase/6/docs/api/

    But still I am not able to see the javadoc on mouse hover of any java or android methods

    Do you have any advice on how to get this working?

  • adityag
    adityag over 12 years
    Hi i just downloaded documentation for android for api 15 from sdk manager. I can see docs folder added in my sdk manager for windows folder. But still I couldnt figure out how to point eclipse to catch that D:\android-sdk-windows\docs folder. can u pls guide further ?
  • adityag
    adityag over 12 years
    Ok, I added file:/D:/android-sdk-windows/docs/reference/ to javadoc location (option found by right click on project and selecting option properties. It said location is likely to be valid and i could open java doc in browser. but still on mouse hover, i am not seeing java doc tips for both java and android methods :(
  • Alex N.
    Alex N. over 10 years
    This is currently the top hit on Google for "eclipse javadoc not working" so I'll leave this here. Un-checking, applying, rechecking, and reapplying worked for me when I lost Javadoc while working in a pure Java environment.