Sign in to follow this  
brassman

Setup Eclipse to use JOGL, Xith3D, etc w/o putting dll libs in non-project locations?

Recommended Posts

Hi all, Just wondering if anybody who uses Eclipse knows how to setup the build environment to use external API's like JOGL, Xith3D or even Java3D without putting DLL's outside of the project folder? I want to be able to take my folder and move it from system to system without having JOGL/Xith3D/Java3D already installed on the system? Any help will be appreciated as this problem is just driving me NUTS! Thanks!

Share this post


Link to post
Share on other sites
1. Add the libraries to a sub dir in your project (ProjectName/Libs or something).
2. Refresh the project so Eclipse picks up that you've added some files behind it's back.
3. Right click on project, go to "properties"
4. Click the "Java build path" on the side, then the "Libraries" tab
5. Click "add jars" and point it to the new jars you added.

That'll do it for any pure java library. I havn't used Jogl or J3D for ages, but I assume they've got a native library (dll/so/something) part as well. You'll still need to specify that as before (usually on the command line in the "run" configurations).

Share this post


Link to post
Share on other sites
Quote:
Original post by OrangyTang
1. Add the libraries to a sub dir in your project (ProjectName/Libs or something).
2. Refresh the project so Eclipse picks up that you've added some files behind it's back.
3. Right click on project, go to "properties"
4. Click the "Java build path" on the side, then the "Libraries" tab
5. Click "add jars" and point it to the new jars you added.

That'll do it for any pure java library. I havn't used Jogl or J3D for ages, but I assume they've got a native library (dll/so/something) part as well. You'll still need to specify that as before (usually on the command line in the "run" configurations).


Hmmm... Cool. I got steps 1-4 down no problem... But it's 5 i'm having a problem with.. There are native libraries for JOGL, JOAL, Java3D, Xith3D, etc.. and I just don't know how to make Eclipse aware that the dll's aren't in their "system" location. I'm not sure how to put that in the run config, but I'll look around a little. Thanks for the help and if you think of anything in the mean time, please do let me know! :)

Share this post


Link to post
Share on other sites
Anybody that uses JOGL/Xith/etc have any pointers? I've looked around and I still can't find the "good" way how to accomplish this..

The kind of structure I want:

Project Folder
|
|_ _ _ src folder (*.java)
|
|_ _ _ bin folder (*.class)
|
|
|_ _ _ lib folder (with JOGL/Xith/J3d Jars/Dlls in it)
|
|
|_ _ _ images
|
...etc

Then, I want eclipse to resolve the dependencies correctly, that way I can develop the applications directly in the IDE. Man, I hope that makes sense, I'm getting pretty frustrated with Java IDE's.

Share this post


Link to post
Share on other sites
Quote:
Original post by brassman
Quote:
Original post by OrangyTang
1. Add the libraries to a sub dir in your project (ProjectName/Libs or something).
2. Refresh the project so Eclipse picks up that you've added some files behind it's back.
3. Right click on project, go to "properties"
4. Click the "Java build path" on the side, then the "Libraries" tab
5. Click "add jars" and point it to the new jars you added.

That'll do it for any pure java library. I havn't used Jogl or J3D for ages, but I assume they've got a native library (dll/so/something) part as well. You'll still need to specify that as before (usually on the command line in the "run" configurations).


Hmmm... Cool. I got steps 1-4 down no problem... But it's 5 i'm having a problem with.. There are native libraries for JOGL, JOAL, Java3D, Xith3D, etc.. and I just don't know how to make Eclipse aware that the dll's aren't in their "system" location. I'm not sure how to put that in the run config, but I'll look around a little. Thanks for the help and if you think of anything in the mean time, please do let me know! :)


6. Click on the '+' left to the "jogl.jar" and some items will appear. One of those is called "Native library location:". Click this one, then "Edit", then browse for the external folder (the one that contains the dlls).



Another option is to replace the default java-builder by an ant-script, which will search add the library to the build path. This will also allow to use the project for different operating systems, i.e. linux and sparc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this