How to set up JOGL in NetBeans
There are two ways to set up JOGL in NetBeans, either through the NetBeans OpenGL Pack or by setting up the library references manually. The plugin will probably be easier, but it will restrict the user to version 1.1.1a of JOGL. This is not a problem as long as the user do not want to explore the possibilities of JOGL 2.
Using NetBeans OpenGL Pack
These steps have been tested on Ubuntu, but should work for Windows or MacOS as well. The plugin was created for NetBeans 6.7, but it seems to work in 7.X as well (except for the GLSL shader editor).
- Download the plugin
- Extract the nbm-files to a temporary directory
- Start NetBeans and select Tools - Plugins in the top menu
- Select the Downloaded pane and press Add Plugin
- Browse to the temporary directory from the second step and select all nbm-files you would like to install (the GLSL editor causes trouble in 7.X)
- Complete the installation by pressing Install and complete the dialog
Using Manual Referencing
If the operating system is Ubuntu, or any other Debian spin-off, then the proper libraries can be downloaded by installing the libjogl-java and libjogl2-java package. Otherwise the proper libraries must be downloaded from the JOGL website. The easiest way to do this is to go to this page and press the jogamp-all-platforms.7z link near the top of the page, but this will only download the newest stable release (the 1.1.1a release should be available in the archive).
- Download the desired library
- Create a new Java project
- Righ-click Libraries and select Add Library
- Press Create to create a new library
- Type in JOGL (or any other name) and press OK
- Select Add JAR/Folder and browse to the location of the jars
- Select the jar-files you want in the library (at least jogl-all.jar and gluegen-rt.jar)
- Finish the dialogs (optinally you can add the source package and javadoc as well under the Create Library dialog.