Muhammad Irfan
Muhammad Irfan

Reputation: 1457

how can we install Java Api Help in Eclipse?

When i am connected with internet, eclipse internal browser opens that page and when i am not connected with the internet, it can not display the web page. I want the web page to be installed locally on my computer, so that i do not have to worry about internet connection.

I am attaching snapshot of the help that i want available offline.

http://cubixshade.com/newScreen.jpg

Upvotes: 7

Views: 11075

Answers (3)

shams.haq
shams.haq

Reputation: 714

Download the javadocs zip file from java website (link for Java 7 docs Here).

Now in ur eclipse go to the Prefernces

Go to Preferences

and choose Installed JREs

Select Installed JREs

Now if u have multiple JREs installed choose the one which you use and click Edit.

Note that the JRE for which the checkbox is checked is the one which is default, u can over ride the default for a specific project.

enter image description here

Expand the lib\rt.jar as shown below.And select the Javadoc location property, click on Javadoc Location button

enter image description here

NOTE :If u have chosen a JDK (as shown above) then there will automatically be a source attachment.(And u probably wont need a javadoc-api explicitly).But in case of a JRE the source will not be available unless specified manually.(See next image.).In Either case u can attach a javadoc offline.

enter image description here

Now in the javadoc window select Javadoc in archive radio button and click on Browse..., select the javadoc zip file downloaded earlier

enter image description here

Click OK or Finish to close all the open windows (javadoc window, Edit JRE window, and Preferences window)

That's it!! Now u can use the javadoc, Enable the javadoc view in Window > Show View > Javadoc.

enter image description here

Just double click on any class in ur java src file editor and u will see the javadoc for it in the javadoc window as well as in a tool tip.

enter image description here

Hope its solved ur problem. Let me know if u have any issues.

Upvotes: 21

Bilal Syed Hussain
Bilal Syed Hussain

Reputation: 9224

  • Download the JDK API http://www.oracle.com/technetwork/java/javase/downloads/index.html#docs
  • Go to the Java Build properties by right clicking on a project and then clicking properties...
  • Click the Libraries tab Libraries tab
  • Click on Javadoc location for classes.jar. Javadoc location for classes.jar
  • 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.

Upvotes: 3

Muhammet Can
Muhammet Can

Reputation: 1354

You can download the java api and use it when you are offline; http://www.oracle.com/technetwork/java/javase/downloads/index.html#docs

Though I'm not sure how to connect the api with eclipse, there should be some settings for it.


edit: you can look at this question for deeper information, there is an answer for eclipse; Offline Java Documentation

Upvotes: 0

Related Questions