Need help setting up and building JOGL project
Posted by Neil on Mar 31, 2012; 12:35pm
URL: https://forum.jogamp.org/Need-help-setting-up-and-building-JOGL-project-tp3873346.html
You will have to forgive me if this is a basic question but I am struggling with this badly!
My objective ->
I want to create a project using JOGL, then build the project using ant to create a .jar that I can then run on any desktop computer (windows, linux, mac)
If it is not possible to create one .jar that can run on any OS then I will need to make 3 distributions but I think that we should be able to make one for all no?
What I have done and it is not working ->
I created a project using Eclipse, I created a libs folder and added
- gluegen-rt.jar
- gluegen-rt-natives-windows-i586.jar
- jogl.all.jar
- jogl-all-natives-windows-i586.jar
I then added these jars to the build path. Great my project now runs from Eclipse! (I'm on a Windowsx64 machine but the 32bit libs worked)
I created an ant build task, one that I have used before and built the project into a .jar file for distribution. I created the .jar and tried to run it... nothing... I ran it from cmd prompt and I see the error
- java.io.FileNotFoundException ....... gluegen-rt-natives-windows-amd64.jar
Interesting... So I was of the opinion that although my Eclipse IDE runs in 32bit my OS wants to run in 64bit. So I though tthat I could take the .jar to a 32bit machine and all would be ok... this was not the case either, I now get that it cannot find the file gluegen-rt-natives-windows-i586.jar. Very confusing.
I have looked at the 'Setting up a JogAmp project in your favorite IDE' wiki page but I cannot follow the instructions namely this bit...
- Double-click "Source attachment", type the module's source zip name, (e.g. jogl-java-src.zip for the JAR file jogl.all.jar), and click "OK".
- Double-click "Native library location", type the directory where native library files are stored, and click "OK".
And I don't know how to add these files to the class path when building with ant.
So what I need to be able to do is have a project that I can build and run :/ can someone please give me instructions on this process please?