How to add javadocs to eclipse
To add Javadoc to Eclipse:
-
download as many Javadoc packages as you want (they should be in
zip
orjar
archives). - Open your Eclipse preferences, and navigate to
Java -> Installed JREs
. Click on the default JRE you use, and click theEdit
button on the right. - In the window that pops up, click
Add External JARs
in the right column, and navigate to where you have the archives saved (you may want to save them somewhere out-of-the-way because if you delete the archives, your Javadoc won't work anymore). - Select the archives, and click
Open
. This should recognize the Javadoc archives and help you with code-completion and documentation (you may have to restart your IDE for this to take effect).
You can find Java SE development kit 7 Documentation here
**You didn't specify what operating system you were on, so each OS may vary slightly.*
Right Click the JAR file in Project Explorer -> Properties -> From the left pane choose Javadoc Location -> enter the URL of your jar documentation.
Generally you can Google for: javadoc lib-name
and then pickup the URL of the first site suggested by Google - going up a level.
For example Google returned this:
http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/index.html
so by going up one level, I mean:
http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/
- Download de documentation of de java API you want to add
- Eclipse > Window > Preferences > Installed JRE
- Click on the jre > Edit
- In the edit jre window > click on the .jar to expand the library
- Click on Javadoc location > click button Javadoc Location on the right
- Check Javadoc in archive > Browse > select the .zip where you downloaded the documentation (no need for extraction)
- On Path Within Archive click con Browse > Select the "api" file where index.html is localted
- Click on validate to check if everything is correct
Enjoy coding!