Setting up a JogAmp project in your favorite IDE
It's very simple to set up an Eclipse project to use JOGL. These instructions assume you've already created a new project in Eclipse and want to add the JOGL libraries to it.
Download and install JOGL
If you haven't done so already, download and install JOGL as described at Downloading_and_installing_JOGL.
Create a JOGL user library
You can make your new Eclipse project depend directly on all the JOGL JARs and native libraries, but it's inconvenient to do that every time you create a new project. Creating a user library bundles all the JOGL files together so you can include them in one step.
- Click "Window > Preferences", then select "Java > Build Path > User Libraries" on the left.
- Click the "New..." button, type "JOGL" for the library name, and click "OK".
- Click the "Add JARs..." button, navigate to the directory where you've stored the JOGL JARs, select gluegen-rt.jar, jogl.all.jar, nativewindow.all.jar and newt.all.jar, then click "Open".
- For each of these four JARs, expand it in the list, double-click "Native library location", type the directory where the JOGL .dll or .so files are stored, and click "OK".
- Click "OK" to exit Preferences dialog.
Add JOGL to your project's dependencies
- Right-click your project in the Package Explorer and clock "Properties".
- Select "Java Build Path" and click the "Libraries" tab.
- Click "Add Library...", select "User Library", click "Next", check "JOGL", and click "Finish".
- Click "OK" to dismiss the Properties dialog.
That's it! You can now use JOGL in your project.