Edward Z. Yang
Edward Z. Yang

Reputation: 26742

Install [java library] in Eclipse

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.

Upvotes: 9

Views: 20011

Answers (4)

Randy Alvarez
Randy Alvarez

Reputation: 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.

Upvotes: 1

tunaranch
tunaranch

Reputation: 1586

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

Upvotes: 0

MetroidFan2002
MetroidFan2002

Reputation: 29908

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.

Upvotes: 0

anjanb
anjanb

Reputation: 13867

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,

Upvotes: 4

Related Questions