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.9.0 or later
- Git 1.6.0 or later
- Use your Unix distribution's version, if available, or
- Source Code for GNU/Linux, MacOSX, .., or
- Git on Windows
- git-osx-installer
- Optional NVidia Cg 2.2
- GNU Linux x86, 32- and 64-bit
You may have to install a few developer packages ...- Debian 9.00 or later
- openjdk-8-jre
- openjdk-8-jdk
- openjfx
- ant
- git
- p7zip-full
- gcc
- libgl1-mesa-dev
- libglu1-mesa-dev
- xorg-dev
- libice-dev
- libsm-dev
- libx11-dev
- libxext-dev
- libxxf86vm-dev
- libxinerama-dev
- libxrandr-dev
- libxrender-dev
- libxcursor-dev
- libxi-dev
- libudev-dev
- libstdc++6
- libstdc++6-4.7 or libstdc++-4.9-dev
- Optional: Your card vendor's proprietary driver
- Debian 9.00 Stretch
apt-get install openjdk-8-jre openjdk-8-jdk openjfx ant git-all p7zip-full gcc libgl1-mesa-dev libglu1-mesa-dev xorg-dev libice-dev libsm-dev libx11-dev libxext-dev libxxf86vm-dev libxinerama-dev libxrandr-dev libxrender-dev libxcursor-dev libxi-dev libudev-dev libc6-dev g++ libstdc++6 libstdc++-6-dev
apt-get install kernel-package build-essential
Optional: Add multiarch i386 next to amd64- Debian 9.00 Stretch
dpkg --add-architecture i386 apt-get update apt-get install lib32z1 lib32ncurses5 gcc-multilib lib32gcc1 lib32gomp1 lib32itm1 lib32quadmath0 libudev1:i386 libc6-i386 libc6-dev-i386 g++-multilib lib32stdc++6 openjdk-8-jre:i386 openjdk-8-jdk:i386 cd /usr/lib/i386-linux-gnu/ ln -s libXrender.so.1 libXrender.so ln -s libXxf86vm.so.1 libXxf86vm.so ln -s libXrandr.so.2 libXrandr.so ln -s libXcursor.so.1 libXcursor.so ln -s libXi.so.6 libXi.so cd /lib/i386-linux-gnu/ ln -s libudev.so.1 libudev.so
- OpenSuSE 10.2 or later
- openjdk-7-jre
- openjdk-7-jdk
- ant
- git
- p7zip-full
- gcc
- x11-devel
- mesa-devel
- CentOS / Red Hat Enterprise Linux 5.4 or later
- openjdk-7-jre
- openjdk-7-jdk
- ant
- git
- p7zip-full
- gcc
- mesa-libGL-devel
- xorg-x11-proto-devel
- libICE-devel
- libSM-devel
- libX11-devel
- libXext-devel
- libXau-devel
- libXdmcp-devel
- libXt-devel
- libXxf86vm-devel
- libXinerama-devel
- libXrandr-devel
- libXrender-devel
- libXcursor-devel
- libudev-devel
- Optional: Your card vendor's proprietary driver
- Debian 9.00 or later
- OpenSolaris SPARC and x86, 32- and 64-bit
- MacOSX Intel
- Windows/x86 (32 bit)
- Windows XP or later
- git, see above
- MinGW64
- Installer
- mingw-build-install
- version: 4.8.1
- host: x32
- threading: win32
- exceptions: SJLJ
- revision: 5
- or manual via 7z archive file
- Installer
- Windows/x86_64 (64-bit)
- Windows XP or later
- git, see above
- MinGW64
- Installer
- mingw-build-install
- version: 4.8.1
- host: x64
- threading: win32
- exceptions: SJLJ
- revision: 5
- or manual via 7z archive file
- Installer
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 --recurse-submodules git://jogamp.org/srv/scm/gluegen.git gluegen /home/dude/projects/jogamp> git clone --recurse-submodules git://jogamp.org/srv/scm/jogl.git jogl
Now you should have following directory structure:/home/dude/projects/jogamp /home/dude/projects/jogamp/gluegen /home/dude/projects/jogamp/jogl
Note-1: The GlueGen source must be fetched using -recurse-submodules, which imports JCPP, now used as the default C preprocessor.
Note-2: In case you do not get the JOGL sources with -recurse-submodules, you will miss the following features:
- OculusVR Support
- 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 "gluegen/make" directory of the source tree and type"ant"
.
Then 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.all"
. 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.
- Christopher Kline and Kenneth Russell, June 2003 (revised November 2006)
- Sven Gothel and Michael Bien, May 2010