Unset your CLASSPATH environment variable: The Ant build requires that the Jogl jars not be visible on the classpath. On Unix, type unsetenv CLASSPATH into a csh or tcsh shell, or set CLASSPATH=; export CLASSPATH into a Bourne shell. On Windows, type set CLASSPATH= into a command prompt.
Edit host.properties: Change any settings in the make/host.properties file that are necessary, in particular the location of the ANTLR jar file (typically $HOME/antlr-2.7.2/antlr.jar).
Build the source tree: Open a command shell in the "make" directory of the source tree and type "ant [target]", where [target] is one of linux, macosx, solaris, win32.vc6, win32.vc7, or win32.mingw.
The win32 targets require one of Microsoft Visual C++ 6, 7 (Visual Studio .NET) or the free MinGW (http://www.mingw.org/) compilers to be installed. Choose the appropriate target for the compiler desired.
An experimental binding to the high-level Cg language by NVidia corporation can be generated by specifying -Djogl.cg=1 to ant; e.g. ant -Djogl.cg=1 win32.vc6. Currently the Cg binding has only been tested on Windows, though in theory it should build and run on Linux and Mac OS X with appropriate modification of the host.properties file.
Add Jogl to your CLASSPATH: To be able to use Jogl once built, you must add the build process' resulting jogl.jar (/build/jogl.jar) to your CLASSPATH environment variable.
Add Jogl to your PATH: To be able to use Jogl once built, you must also add the build process JNI code library directory (/build/obj) to your PATH.
Test if everything's working: To test if everything went well, you should check out the source code for the jogl-demos project (available at http://jogl-demos.dev.java.net/), build the demos using the supplied instructions, and run the Gears demo ("java demos.gears.Gears").
Build Javadoc: "ant javadoc" will produce the end-user documentation for Jogl along with some auxiliary utility packages. The developers' documentation, including that for the GlueGen tool, can be generated for your current platform using one of the following commands: "ant javadoc.dev.win32", "ant javadoc.dev.x11", or "ant javadoc.dev.macosx". (The javadoc for the Cg binding can be built by inserting -Djogl.cg=1 into the command line as above.)
Note that there are a lot of warnings produced by ANTLR about the
C grammar and our modifications to some of the signatures of the
productions; the C grammar warnings have been documented by the
author of the grammar as having been investigated completely and
harmless, and the warnings about our modifications are also
harmless.
- Christopher Kline and Kenneth Russell, June 2003