This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm trying to build a new application in eclipse which is using Jetty. I'd like to be able to use content assist (CTRL + space) so that I can view the javadoc info from the jetty classes. I tried to add a javadoc location to a few of the jar files I imported (http://download.eclipse.org/jetty/stable-7/apidocs/) but I'm not getting anything in the content assist window. Has anyone had any luck with this for other apis? I have it working fine for the JDK but only because I attached the src.zip
You added the Jetty library (usually a .jar file) to your project?
If you have, do the steps below. If you have, skip to Step 2.
right click the project
select Java Build Path in the left column
select the Libraries tab across the top of the right
select the button Add External JARs button on the far right
navigate to the location of the Jetty library, select the library file, select OK
stay on the resulting screen
Step 2 (editing the library's Javadocs location):
Once the library is added to the project
expand the Jetty jar you just added (or had already added) by clicking on the triangle to its left
select Javadoc location:
choose the Edit button to the right
navigate to the root folder containing the Javadocs for Jetty using Browse, select it
Try the Validate button which does a simple test on the folder's contents to see if it has Javadoc characteristics.
If successful, OK back to Eclipse, and the Content Assist should work. The above steps assume you've done a few other things right (like saved the Javadocs somewhere in the expected format), so if the instructions don't work for you, come back with more questions and symptoms.
Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
Okay. You tried to say that in your first post, and I didn't understand what you meant.
I don't know if you can specify an http:// address as the Javadoc location. I've never tried, because my internet is lousy, and I can't imagine setting up my environment that way. Try going through the process I outlined but specifying a web location.
OR as a fallback, if you can't get that to work:
The Jetty distribution you downloaded (I assume you downloaded one) has a folder called "javadoc." If you extract that folder to a local location and select that local location (folder) using the steps I outlined previously, then you'll have what you want.