4/20/2009

Install javaDocs and setup in eclipse on Ubuntu

The default installation of Eclipse did not include Javadoc,so here's how to get Javadoc installed and working.


First, enter


sudo apt-get install sun-java6-doc


The installer will prompt you to download a zip file containing the documentation from Sun. Bring up Firefox and head to Sun's website. Click the zip file to download the documentation(only english version enough, never japs).

When the download finishes, in another terminal, enter


sudo cp /path/to/zip/file/documentation.zip /tmp


Enter
sudo chown root:root /tmp/documentation.zip


to change the file permissions.

Back in the first terminal, hit enter, and the installer should continue. When it finishes, in Eclipse,


click Window -> Preferences -> Java -> Installed JREs, and click the JRE . Click Edit, and use Shift+Click to select all the JRE system libraries. Click Javadoc Location, and enter


file:/usr/lib/jvm/java-6-sun/docs/api/

in the box. Click Validate to test it (you can open it in your browser to double check), and click OK out of all the dialogs. Javadoc should now be working!

2 comments:

Anonymous said...

Very helpful to me.Thanks!

paul said...

Ditto. Excellent!