Platform and Component Requirements
Here is a list of platforms and components, we were able to build JOGL on,
if not stated otherwise.
- Java
One of the following desktop Java SDK's: or you may try one of the following embedded Java SDK's (not yet tested): or even the JavaME SDK's (see notes):- phoneME (tested with a proprietary VM build)
(tested with a proprietary VM build) - JamVM (not yet tested)
(not yet tested) - CacaoVM (not yet tested)
(not yet tested)
- phoneME (tested with a proprietary VM build)
- Ant 1.8.0 or later
- Git 1.6.0 or later
- Source Code for GNU/Linux, MacOSX, ..
- Git on Windows, download version 1.7.0 or later.
- GNU Linux x86, 32- and 64-bit
You may have to install a few developer packages ...- [k]Ubuntu 10.04 or later
- gcc
- libgl1-mesa-dev
- libglu1-mesa-dev
- libice-dev
- libsm-dev
- libx11-dev
- libxext-dev
- libxxf86vm-dev
- xorg-dev
- Optional: Your card vendor's proprietary driver
- OpenSuSE 10.2 or later
- gcc
- x11-devel
- mesa-devel
- CentOS / Red Hat Enterprise Linux 5.4 or later
- gcc
- mesa-libGL-devel
- libICE-devel
- libSM-devel
- libX11-devel
- libXau-devel
- libXdmcp-devel
- libXt-devel
- libXxf86vm-devel
- xorg-x11-proto-devel
- Optional: Your card vendor's proprietary driver
- Windows XP or later
- MinGW
Read MinGW Getting Started and HOWTO Install the MinGW GCC Compiler Suite. - Not supported: Microsoft Visual C++ 6.0 or later
Currently broken ..
Additional platforms such as FreeBSD and HP/UX are handled by the build system, but are not officially supported.
Build Steps
Here are the steps that are required in order to build JOGL.
- Optain the source code using git:
It is crucial that you checkout the source code under a common root directory:/home/dude/projects/jogamp> git clone git://github.com/sgothel/gluegen.git gluegen /home/dude/projects/jogamp> git clone git://github.com/sgothel/jogl.git jogl
Now you should have following directory structure:/home/dude/projects/jogamp /home/dude/projects/jogamp/gluegen /home/dude/projects/jogamp/jogl
- Unset your CLASSPATH environment variable:
The Ant build requires that the JOGL jars not be visible on the classpath. On Unix, typeunsetenv CLASSPATH
into a csh or tcsh shell, orunset CLASSPATH
into a Bourne shell. On Windows, typeset CLASSPATH=
into a command prompt. - Optional Copy and edit gluegen.properties:
To specify different basic options for components and compilers,
copy gluegen/make/gluegen.properties into your home directory (pointed to by the Java system property user.home). - Optional Copy and edit jogl.properties:
To specify different basic options for the build,
copy jogl/make/jogl.properties into your home directory (pointed to by the Java system property user.home).
Edit the copy to change desired settings. - Build the source tree:
Open a command shell in the "jogl/make" directory of the source tree and type "ant".- 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
. The Cg binding has been tested on Windows, Linux, and Mac OS X.
- An experimental binding to the high-level Cg language by NVidia corporation can be generated by specifying
- Test your build:
Stay in your command shell in the "jogl/make" directory of the source tree and type "ant junit.run". - Build Javadoc:
Stay in your command shell in the "jogl/make" directory of the source tree and type "ant javadoc". This will produce the end-user documentation for JOGL along with some auxiliary utility packages.
Common build problems
- Your CLASSPATH environment variable appears to be set (some JOGL classes are currently visible to the build.), and $CLASSPATH isn't set.
- An older version of JOGL was installed into the extension directory of the JDK you're using to build the current JOGL. On Windows and Linux, delete any ANTLR jars from jre/lib/ext, and on Mac OS X, delete them from /Library/Java/Extensions. It is generally not a good idea to drop JOGL directly into the extensions directory, as this can interfere with upgrades via Java Web Start.
- CharScanner; panic: ClassNotFoundException: com.sun.gluegen.cgram.CToken
- This occurs because ANTLR was dropped into the Extensions directory of the JRE/JDK. On Windows and Linux, delete any ANTLR jars from jre/lib/ext, and on Mac OS X, delete them from /Library/Java/Extensions. Use the antlr.jar property in the build.xml to point to a JRE-external location of this jar file.
- Sven Gothel, May 2010