Installing Java3D on Mac OSX

Installing Java3D on Mac OSX

Java3D on the Mac performs rendering through a different library package called Java OpenGL (JOGL) and requires those libraries in addition to Java3D 1.5.2.  JOGL has been through several versions and no clear installation instructions exist, so I will lay out exactly what libraries must be installed.

1.  Snow Leopard includes an old version of Java3D (1.3) so these libraries must first be deleted from the system.  Delete or rename the following files in /System/Library/Java/Extensions:

j3daudio.jar
j3dcore.jar
j3dutils.jar
libJ3D.jnilib
libJ3DAudio.jnilib
libJ3DUtils.jnilib
vecmath.jar

2.  Download the following:

http://jogamp.org/deployment/archive/master/jogl-old-1.1.1/jogl.jar
http://jogamp.org/deployment/archive/master/jogl-old-1.1.1/jogl-natives-macosx-universal.jar
http://jogamp.org/deployment/archive/master/gluegen-old-1.0b6/gluegen-rt.jar
http://jogamp.org/deployment/archive/master/gluegen-old-1.0b6/gluegen-rt-natives-macosx-universal.jar

3.  Copy all the jar files into /Library/Java/Extensions.  From the terminal, use the command “jar xvf [jarFile]” to unpack the two files that contain “-natives-” in the filename.

4.  The libraries included with JMF and Java3D should be in the Extensions directory following their installation.  If their installer did not place them there, manually copy the libraries.

5.  Try launching CdsViz with “java -jar CdsViz.jar”.  If there are any errors regarding not finding jogl classes, try “java -Djava.library.path=/Library/Java/Extensions/ -jar CdsViz.jar”.