Setting up a JogAmp project in your favorite IDE

It's very simple to set up a project of your favorite IDE to use a JogAmp library. These instructions assume you've already created a new project in the IDE.

= Download a JogAmp project =

If you haven't done so already, download and extract for example JOGL as described at Downloading_and_installing_JOGL.

To be able to use a JogAmp library you will have to add the jar files to the classpath and the native files to the library path of your projects run configuration. Please note that all projects depend on the GlueGen runtime libraries which are for convenience reasons included in every JogAmp project but only required once in the classpath/library path of your application.

= Eclipse IDE =

Create a user library
You can make your new Eclipse project depend directly on all the 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 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 "JOAL", "JOCL", "JOGL" or "GlueGen RT" for the library name, and click "OK".
 * Click the "Add JARs..." button, navigate to the directory where you've stored the JARs, select them, then click "Open".
 * Expand the jar in the list, double-click "Native library location", type the directory where native library 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 the library in your project.

= IntelliJ IDEA =

Add JOGL dependency to project

 * Click "File > Project Structure".
 * Select "Modules" on the left, then click the "Dependencies" tab on the right.
 * Click the "Add..." button, then click "Library...".IntelliJ_setup_01_add_library.png
 * Type "JOAL", "JOCL", "JOGL" or "GlueGen RT" as the library name.
 * Click "Attach JAR Directories...", navigate to the directory where you extracted the JARs and click "OK".
 * Click "OK" to dismiss the Configure Library dialog.IntelliJ_setup_02_configure_library.png
 * Click "OK" to dismiss the Project Structure dialog. The external libraries in your project should now look like this.IntelliJ_setup_03_external_library.png
 * Click "Run > Edit Configurations".
 * Type -Djava.library.path=your/path/to/native/library/files in the "VM Parameters" box.IntelliJ_setup_04_run_configuration.png
 * Click "OK" to dismiss the Run/Debug Configurations dialog.

That's it! You can now use the library in your project.

= NetBeans IDE =

Create a JOGL library dependency

 * Right-click your project and click "Properties".
 * Select "Libraries" on the left and click "Add Library...".
 * Click the "Create" button, then type "JOAL", "JOCL", "JOGL" or "GlueGen RT" for the library name and click "OK".NetBeans_setup_01_create_library.png
 * Click "Add JAR/Folder...", then navigate to the directory you extracted the JAR files, select them and click "Add JAR/Folder".
 * Click "OK" to dismiss the Customize Library dialog.
 * Click "Add Library" to dismiss the Add Library dialog.NetBeans_setup_02_add_library.png
 * Click "OK" to dismiss the Project Properties dialog. The libraries in your project should look like this.NetBeans_setup_03_libraries_in_project.png
 * Click "Run > Set Project Configuration > Customize...". Select "Run" on the left if it isn't selected already.
 * Type -Djava.library.path=your/path/to/native/library/files in the "VM Options" box.NetBeans_setup_04_native_library_path.png
 * Click "OK" to dismiss the Project Properties dialog.

That's it! You can now use the library in your project.

= Vi =

Open a shell of your choice
$vi

That's it!