views:

2227

answers:

3

I just downloaded Eclipse several hours ago, and needed to add Java3D to the classpath. Installing it went without a hitch, but Eclipse can't seem to find the documentation folders so that it can give super-IDE functionality, such as autocomplete and method signatures.

While I know how I would add them individually, this lead me to the question; what is the "correct" way to install a Java library in Eclipse? Is there a special directory format I should follow? Is there a plugin that already did this for me? (The answer to that is yes, but I don't know how to use it, or whether or not it's appropriate).

Thanks!

Edit 1: It seems to me that someone down-voted the question. May I ask why?

Edit 2: So after monkeying around with the JARs, it seems that manually setting the doc path for each JAR in the library seems to be the least-error prone way.

+3  A: 

hi there,

when you add a .JAR(library) to your project in the LIBRARIES tab for your project, you have the option of attaching the javadoc directory for the jar.

So, go to the LIBRARIES tab of the "java build path" for your projects. select your jar. expand the (+) sign and you will see that you can set the javadoc. path.

good luck,

anjanb
Yep; this much I know already. However, in the case of Java3D, there are three JARs, and only one documentation directory. Setting the javadoc path to this directory doesn't enable the IDE integration.
Edward Z. Yang
A: 

As far as I know (haven't used 3.4 very much thus far), Eclipse has two options for the automatic showing of Javadocs. The first is a JavaDoc jar to attach to the jar file. The second is having the javadoc in a source jar which is attached to the jar to show the source.

A directory, if I recall correctly, will not provide autocompletion of javadoc. However, if you press "F1", you will be able to access the javadoc via the help menu.

You might try placing the documentation directory into a jar file, and attaching it to the jar file and see if that tricks Eclipse.

MetroidFan2002
This sounds quite convoluted. :-/ However, you seem right in observing that the directory will not provide autocompletion. I am going to try this out.
Edward Z. Yang
A: 

I cheat; All my java projects are built with maven, so I use maven to generate an eclipse project, with classpaths etc already setup, with a simple 'mvn eclipse:m2eclipse'.

tunaranch
This would work if I was building Java3D myself. Is this what you suggest I do?
Edward Z. Yang