I want to set up my Eclipse installation so that when I use the content assist and hover over / inspect a method therein, it shows me the Java EE documentation. How do I integrate it?
You'll need to locate your documentation and your server's servlet JAR, and then add the JAR to your installed JRE and attach the documentation. This answer presumes you have already installed your server and integrated it into Eclipse.
You can link to documentation in a few ways:
Whichever way you decide, be sure you have the location handy.
You'll need to find the servlet JAR for your server setup. The JAR and its location depend on which server you use. Navigate to your server's installation directory and find the file as follows:
lib/servlet-api.jar
modules/javax.servlet-api.jar
This list is by no means exhaustive. Regardless, be sure you have the JAR's location handy also.
Navigate to your JRE installation as follows:
Window
menu, then select Preferences
.jre
, and then click Installed JREs
.
Java
tree and selecting Installed JREs
.java
, or another term like jre7
.
Standard VM
.Then, edit the installation:
JRE system libraries
section, click the Add External JARs... button.First, select your newly-added servlet JAR and click the Javadoc Location... button. The way you attach the documentation depends on its source.
Javadoc location path
field, enter or Browse for your documentation location, specifically the path containing package-list
and index.html
.Archive path
field, enter or Browse for your full documentation path (e.g. /home/docs/jdk-6-doc.zip
).Path within archive
field, enter or Browse for the path containing package-list
and index.html
(e.g. docs/api
).