Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can we install Java Api Help in Eclipse?

Tags:

java

eclipse

api

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

like image 595
Muhammad Irfan Avatar asked Feb 28 '12 13:02

Muhammad Irfan


1 Answers

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.

like image 92
shams.haq Avatar answered Sep 19 '22 05:09

shams.haq