Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javadoc location for eclipse offline

The help for Java in Eclipse (ordinary Java development, not Android), is set to an online URL at Oracle's server, linked to http://docs.oracle.com/javase/6/docs/api/. However, with one specific computer, I cannot be online during a Java class I teach. So I want to use a local help.

I tried the following:

  • Open the windows - preferences - java - installed jre
  • select the 1.7 runtime, and there the rt.jar
  • press Javadoc location.

There I see the link to the online help. I tried to use the source archive instead, the src.zip folder in the JDK directory. But that does not work. The source does not contain compiled Java doc anyway.

Do I have to download the API docs? And if, where?

like image 425
Rene Avatar asked Apr 22 '12 09:04

Rene


1 Answers

Of course, I had already installed a JDK with a source. On the machine I found a JRE7 and JDK1.7xxx, and the projects use the JRE7.

  1. In Window - Preferences - Java - Installed JRE I found a link to the JRE7, which does not contain sources or a Javadoc.

  2. So I pressed "Edit" and browsed the directory to the JDK1.7, then pressed "Restore Default". This will change the JRE system libraries to the JDK. The Javadoc locations for rt.jar and the other jars is now at Oracle, but nevertheless the installed src.zip is used, if there is no internet connection.

Alternatively, it is indeed possible to attach the src.zip file (file!) to the rt.jar of JRE7.

like image 172
Rene Avatar answered Oct 06 '22 17:10

Rene