How do I add the Java API documentation to Eclipse?

eclipse add javadoc comments automatically
how to add javadoc in eclipse
how to use javadoc in eclipse
java documentation
eclipse javadoc plugin
download javadoc
generate a java doc in eclipse
javadoc lib-name

I have downloaded Java API documentation from and have supposedly attached it to Eclipse using the

Window->Preferences->Java->Installed JREs->Edit->"Select rt.jar"->Javadoc Location

And the location has been accepted and "Validates" just fine. However, for the life of me, I can't get Eclipse to show the Javadocs in the tooltip whene I hover over an item (for example in the declaration of an ArrayList). I have also restarted Eclipse in attempts to get it to work

What am I doing wrong?

Eclipse doesn't pull the tooltips from the javadoc location. It only uses the javadoc location to prepend to the link if you say open in browser, you need to download and attach the source for the JDK in order to get the tooltips. For all the JARs under the JRE you should have the following for the javadoc location: For resources.jar, rt.jar, jsse.jar, jce.jar and charsets.jar you should attach the source available here.

How do I add the Java API documentation to Eclipse?, Eclipse doesn't pull the tooltips from the javadoc location. It only uses the javadoc location to prepend to the link if you say open in browser, you  Click browse and select the folder where you downloaded the documentation to. (Choose the API folder for java 6 and java 7). Click OK (twice). It will now use the offline version.

To use offline Java API Documentation in Eclipse, you need to download it first. The link for Java docs are (last updated on 2013-10-21):

Java 6 Page: Direct:

Java 7 Page:

Java 8 Page:

Java 9 Page:

  1. Extract the zip file in your local directory.
  2. From eclipse Window --> Preferences --> Java --> "Installed JREs" select available JRE (jre6: C:\Program Files (x86)\Java\jre6 for instance) and click Edit.
  3. Select all the "JRE System libraries" using Control+A.
  4. Click "Javadoc Location"
  5. Change "Javadoc location path:" from "" to "file:/E:/Java/docs/api/".

It must work as it works for me. I don't need Internet connection to view Java API Documentation in Eclipse anymore.

How to generate Javadoc in Eclipse, How to generate Javadocs for a Java project using Eclipse IDE. Java programming, we can use the javadoc tool for generating API documentation from Specify the destination directory where the Javadocs will be put in. Add External Jar into Eclipse Build Path for Office API - Duration: 14:36. Tanes Kanchanawanchai 6,011 views

For offline Javadoc from zip file rather than extracting it.

Why this approach?

This is already answered which uses extracted zip data but it consumes more memory than simple zip file.

Comparison of zip file and extracted data.  --->  ~57 MB
after extracting this zip file  --->  ~264 MB !

So this approach saves my approx. 200 MB.

How to use

1.Open Windows -> Preferences

2.Select jre from Installed JREs then Click Edit...

3.Select all .jar files from JRE system libraries then Click Javadoc Location...

4.Browse for file for Archive path and set Path within archive as shown above. That's it.

5.Put cursor on any class name or method name and hit Shift + F2

How to Attach JavaDocs source to Eclipse, An Eclipse plugin which generates Javadoc for getters and setters of a Java class​. Keep your code and documentation in sync by linking your code and doc. JAutodoc is an Eclipse Plugin for automatically adding Javadoc and file headers​  Select the project and packages for which you want to generate Javadoc. Narrow down the source files whose Javadocs will be generated (All files are selected by default). Limit what class members which will have Javadocs generated, by choosing the visibility (access modifier).

Old question, but I had current problems with this issue. So I provide you my solution. Now the sources and javadocs are inside the jdk. So, unzip your jdk version.You can see that contanins a "" file. Here are your needed sources and doc files. Follow the path: Window->Preferences->Java->Installed JREs-> select your jre/jrd and press "Edit" Select all .jar files, and press Source Attachement. Select the "External File..." button, and point it to file.

Maibe a restart to Eclipse is needed. (normally not) Now you should see the docs, and also the sources for the classes from jdk.

Javadoc location property page, This tool is used to create a standard documentation of Java code in HTML tool is able of run through the java file and create the API documentation. and add a Throws subheading to the documentation with the class-name Eclipse provides an option to generate documentation from the Project menu. Generating Java Documentation The easiest way to generate documentation of the source code is through the IDE. Eclipse provides an option to generate documentation from the Project menu. In fact, the IDE takes up the responsibility of invoking the javadoc tool and providing a GUI interface to interact upon while generating the documentation.

I went through the same problem and I did not find some of the above answer useful because they are old and with new JDK 1.8 , documentation section has been moved to in JDK folder (C:\Program Files\Java\jdk1.8.0_101 ) .

Now I tried everything from above and it was showing me the same problem if I press ctrl and click on (for example String or System) in my program I get the Source not found.

Now you can do this, go to the folder where JDK (C:\Program Files\Java\jdk1.8.0_101) is installed and try to unzip Here you might face an issue as sometime due to administrative rights on this folder it would not allow you to unzip this For solving the issue , copy and paste in any other folder ( example Desktop) and then create a folder src and unzip in it. Now copy this folder back to JDK 1.8 folder**(C:\Program Files\Java\jdk1.8.0_101).**

Now just go to eclipse and open any program and press ctrl and click on any external objects or anything (for example String or System) .You will get Source not found , Now Click Attach source -> External Location -> External Folder and add your src location (C:\Program Files\Java\jdk1.8.0_101\src). Now you are good to go , I tried and it worked for me.

All the above folder location are from my system , so It might be different for you.

javadoc, Before using JavaDoc tool, you must include JavaDoc comments /**… automatically generate the JavaDoc file like NetBeans, IntelliJ IDEA, Eclipse etc. To create the Java documentation API, you need to write Javadoc followed by file  Then to generate the document follow the steps given below: Step 1: Open eclipse, select the option Project-->Generate Javadoc. Step 2: Select the javadoc.exe file from the bin folder of java installation directory, select the destination folder for the generated java doc and select Next.

How to Create Java API Documentation, For example, microsoft-windowsazure-api-0.1.0.jar (the version number may be different, dependent upon which version you have installed). The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 350 open source projects, including runtimes, tools and frameworks.

What is JavaDoc tool and how to use it?, And the location has been accepted and "Validates" just fine. However, for the life of me, I can't get Eclipse to show the Javadocs in the tooltip  For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Display Javadoc Content in Eclipse, How to Add Tomcat Server in Eclipse IDE Writing Javadoc Comments and creating an API with the Javadoc Tool on Eclipse - Java 8:29. Using the JAVA API Online Documentation - Duration: 14

  • Ah. Didn't realise this at the time, since I'm developing an Android application I don't seem to use the JRE jar files, instead use an Android jar file :-/ I attached the java api doc to this file and the tooltip started working. Thanks for your help
  • Follow steps in this link, it worked for me.
  • also it should be noted that when you press F3 on a Java class from the API it will try to open the source not the Javadoc, normally you won't need to look at the source code for a native Java library and can instead mouse over and click the bottom icon in the tooltip that directs you to "open attached Javadoc in browser" this will load your local Javadoc if you follow the directions in the following answer.
  • For JDK 10 you can follow below step:…
  • I downloaded that jar and attached it as source for all those jars, but the tool tips and the javadoc viewer both still aren't showing the details
  • Is the JRE you are modifying the default? Also is it the JRE selected for the project(right click on the project and go to preferences)? If so can you press F3 while highlighting a JRE class and pull up the source?
  • Is that still correct? I have a current workspace where no source code is attached, only javadoc, and it shows the tooltips just fine.
  • Still not working... Note: This element has no attached source and the Javadoc could not be found in the attached Javadoc.
  • @AhmedHamdy make sure you point to ../docs/api and not just /docs (I did that the first time)
  • Currently it does not work for Java 11.
  • Thanks a lot! This is exactly what I was looking for!
  • I think this solves the problem correctly, cause I didn't see any "Javadoc" or in the JDK folder. The isn't a Javadoc but the sources - and your answer solve my problem, Thanks!
  • it says: "Location is likely valid. Files 'package-list' and 'index.html' have been found.
  • try opening the javadoc view then select a standard class or method.