Question

Is there an integration of any other off line way to get the Java API docs?

Was it helpful?

Solution

If you have no internet connection on your development machine, or if you want to stop the Web traffic for accessing the documentation, you can store the documentation on your local hard drive.

  1. Start your favorite Web browser and navigate to http://www.oracle.com/technetwork/java/javase/downloads/index.html#docs
  2. Find your desired documentation, accept the license agreement, and then click the link displayed under the Download header.
  3. In Eclipse, open the Window menu, then select Preferences.
  4. In the search bar, type jre, and then click Installed JREs.
  5. Select the one named java, or another term like jre1.8.0_181.
    • Its type must be Standard VM.
  6. Click the Edit button.
  7. In the JRE system libraries section, select the library ending with rt.jar, and click the Javadoc Location... button.
  8. Mark the Javadoc in archive radio button.
  9. In the Archive path field, enter or Browse for your full documentation path (e.g. /home/docs/jdk-8u181-doc.zip).
  10. In the Path within archive field, enter or Browse for the location of the api/index.html file (e.g. docs/api).
  11. Click the Validate button to ensure everything is set correctly.
  12. Click the OK button, then the Finish button, and finally the Apply & Close button. Your documentation is now linked to the file you specified.

OTHER TIPS

Just a quick contribution: Instead of selecting 7 "Javadoc in archive", I changed the javadoc location path (URL) to my directory, where I have unzipped my doc. Hope its help!!!

This worked for me (Java 8):

  1. Go to your JDK installation. (C:\Program Files\Java\jdk1.8.0_66 for me).

  2. Unzip the src.zip file (becomes C:\Program Files\Java\jdk1.8.0_66\src\ for me).

  3. In the Eclipse editor window: CTRL + Click on a java.lang library class. (something like String).

  4. Eclipse will complain Source not found and tell you that you don't have the source.

  5. Click Attach source -> External Location -> External Folder.

  6. Find your source folder (C:\Program Files\Java\jdk1.8.0_66\src\ for me).

  7. Click OK -> OK.

  8. Enjoy.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top