简体   繁体   中英

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!

It seems to me that someone down-voted the question. 在我看来,有人对这个问题进行了投票。 May I ask why?

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. 因此,在使用JAR进行调整之后,似乎手动设置库中每个JAR的文档路径似乎是最不容易出错的方式。

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,

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM