For now, you will find how to run the application under eclipse (as well as the jogl installation prerequesite) and how to build jars for the different OS.
Notice that you will need the 7zip unarchiver program in order to extract them. The javadoc archives will help you when you'll use Jogl classes in Eclipse.
Creating the JOGL Core user library under Eclipse
First go into Windows->Preferences menu and type into the search box : User Libraries
![Eclipse User Libraries preferences]
(http://img11.hostingpics.net/pics/421530RubikCubeEDIWIKITuto1OverallPreferences.png "Eclipse User Libraries preferences")
Click on the "New..." button and define your JOGL_Core user library name, BUT SET THE "SYSTEM LIBRARY" OPTION OFF.
![Setting the library name]
(http://img15.hostingpics.net/pics/627281JOGLDansEclipse2.png "Setting the library name")
Your new library has just been created, but has no defintion :
![User library created but empty]
(http://img15.hostingpics.net/pics/388260JoglDansEclipse3.png "User library created but empty")
So,
Adding the jars to the JoglCore library
Select it and click and the "Add External Jars..." button (on the right)
Go into your uncompressed jogamp-all-platforms archive, and enter the jar subfolder
Add the jar gluegen-rt.jar
Do the same for the jogl-all.jar
So you see four categories in these jar entries.
![Gluegen and Jogl jars are added]
(http://img15.hostingpics.net/pics/558579JoglInEclipse4.png "Gluegen and Jogl jars are added")
We will only fill the nodes "Javadoc" and "Sources" for both nodes. Natives files are given as separates jars, so we won't need to set up the "natives" nodes.
Adding the javadocs to the JoglCore library
We will add the javadoc of the jars we've just added, so that Eclipse can tell us what are their classes and methods purposes.
I give you the procedure for the gluegen javadoc, but the procedure is similar for the jogl javadoc.
Double click on the javadoc node of the Gluegen entry of your Jogl Core library. So you see a new dialog window : select the radio button "Javadoc URL" and click on the associated "Browse..." button :
Go to your uncompressed gluegen-javadoc archive, and enter the "javadoc" directory, then press "Validate" button
So you're back in the old dialog window. In order to be sure the path is good, you can press the "validate" button associated with the "Javadoc URL" radio button : you will be told if the path you have given seems to be a good path or not.
Don't forget to validate this dialog window.
Adding the sources to the JoglCore library
This step is not necessary neither, i think but you'd better set it if you manage to. Anyway, I tell you how to set it. The procedure is the same for both jars.
Double click on the source attachment node of the Gluegen jar (in your Jogl Core library). And in the new dialog window, select the "External location" radio button, then click on the "External file" button
Go to your uncompressed jogamp-all-platforms archive and select the file gluegen-java-src.zip
Don't forget to validate this dialog window.
Creating all the JOGL Native user library under Eclipse
We will start with the Windows_native_32bits user library, but the procedure is similar for other OS (Windows 64 bits, Linux 32, Linux 64, Solaris 32, Solaris 64, MacOsX universal). I'll just give you a table in order to know which file to use for which version.
Our first example
Click on New.. button (on the right), and enter the new library name (Windows_Native_32)
Go to the uncompressed archive of jogamp-all-platforms, and enter the jar subfolder.
Add the jars, with the button "Add external jars ..." on the right, gluegen-rt-natives-windows-i586.jar and jogl-all-natives-windows-i586.jar
Natives libraries references
Here are all references :
Jogl_Natives_Windows_32
gluegen-rt-natives-windows-i586.jar
jogl-all-natives-windows-i586.jar
Jogl_Natives_Windows_64
gluegen-rt-natives-windows-amd64.jar
jogl-all-natives-windows-amd64.jar
Jogl_Natives_Linux_32
gluegen-rt-natives-linux-i586.jar
jogl-all-natives-linux-i586.jar
Jogl_Natives_Linux_64
gluegen-rt-natives-linux-amd64.jar
jogl-all-natives-linux-amd64.jar
Jogl_Natives_Solaris_32
gluegen-rt-natives-solaris-i586.jar
jogl-all-natives-solaris-i586.jar
Jogl_Natives_Solaris_64
gluegen-rt-natives-solaris-amd64.jar
jogl-all-natives-solaris-amd64.jar
Jogl_Natives_MacOsX
gluegen-rt-natives-macosx-universal.jar
jogl-all-natives-macosx-universal.jar
Conclusion
Now you should have your Jogl user libraries set up. In other billets I'll show you :
How to use the Jogl Core and the Jogl Native (matching your os) in order to run the project
How to export the project for the different OS.
Last edit: laurent bernabé 2013-08-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Setting up JOGL Library for Eclipse EDI
In this billet I'll first show you how to setup JOGL library into Eclipse.
Notice that I used the Eclipse Juno version, you may have different menus, specially if you are using an older version.
Steps summary
Downloading JOGL library
JOGL Rubik's Cube project is based on JOGL 2, which you can find on Jogamp site. The download page is http://jogamp.org/deployment/jogamp-current/archive/.
Download the files :
Notice that you will need the 7zip unarchiver program in order to extract them. The javadoc archives will help you when you'll use Jogl classes in Eclipse.
Creating the JOGL Core user library under Eclipse
First go into Windows->Preferences menu and type into the search box : User Libraries
![Eclipse User Libraries preferences]
(http://img11.hostingpics.net/pics/421530RubikCubeEDIWIKITuto1OverallPreferences.png "Eclipse User Libraries preferences")
Click on the "New..." button and define your JOGL_Core user library name, BUT SET THE "SYSTEM LIBRARY" OPTION OFF.
![Setting the library name]
(http://img15.hostingpics.net/pics/627281JOGLDansEclipse2.png "Setting the library name")
Your new library has just been created, but has no defintion :
![User library created but empty]
(http://img15.hostingpics.net/pics/388260JoglDansEclipse3.png "User library created but empty")
So,
Adding the jars to the JoglCore library
So you see four categories in these jar entries.
![Gluegen and Jogl jars are added]
(http://img15.hostingpics.net/pics/558579JoglInEclipse4.png "Gluegen and Jogl jars are added")
We will only fill the nodes "Javadoc" and "Sources" for both nodes. Natives files are given as separates jars, so we won't need to set up the "natives" nodes.
Adding the javadocs to the JoglCore library
We will add the javadoc of the jars we've just added, so that Eclipse can tell us what are their classes and methods purposes.
I give you the procedure for the gluegen javadoc, but the procedure is similar for the jogl javadoc.
Adding the sources to the JoglCore library
This step is not necessary neither, i think but you'd better set it if you manage to. Anyway, I tell you how to set it. The procedure is the same for both jars.
Creating all the JOGL Native user library under Eclipse
We will start with the Windows_native_32bits user library, but the procedure is similar for other OS (Windows 64 bits, Linux 32, Linux 64, Solaris 32, Solaris 64, MacOsX universal). I'll just give you a table in order to know which file to use for which version.
Our first example
Natives libraries references
Here are all references :
Jogl_Natives_Windows_32
Jogl_Natives_Windows_64
Jogl_Natives_Linux_32
Jogl_Natives_Linux_64
Jogl_Natives_Solaris_32
Jogl_Natives_Solaris_64
Jogl_Natives_MacOsX
Conclusion
Now you should have your Jogl user libraries set up. In other billets I'll show you :
Last edit: laurent bernabé 2013-08-18