9

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.

4 Answers 4

4

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,

1
  • 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. Oct 16, 2008 at 3:32
1

I think I've got it (had the same issue as you). Better late than never.

Go here - http://java3d.java.net/binary-builds.html and download the documentation zip (j3d-1_5_2-api-docs.zip).

Extract the directory anywhere on your HD (Right in the Java3d folder is fine).

Link the Jar's JavaDoc listing to that Folder (java build path >> Libraries >> expand the Jar Listing >> JavaDoc Location >> browse to the folder location, then validate). Do it for each j3d Jar.

That should integrate the J3D Javadoc.

0

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.

1
  • This sounds quite convoluted. :-/ However, you seem right in observing that the directory will not provide autocompletion. I am going to try this out. Oct 16, 2008 at 4:10
0

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'.

1
  • This would work if I was building Java3D myself. Is this what you suggest I do? Oct 16, 2008 at 4:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.