the waiting game
No matter what apple says about Java development on the Mac, I always hated the waiting game before I could use some new Java API. First, it was Java 5 Tiger, which because apple ports it themselves to the platform, lagged considerably behind the Sun release. Then, it was Java3D and the JAI API. Even now, the Java3D API on OSX is at 1.3. I'm just glad that the JOGL and Java3d folks found a way to bypass Apple's porting process this time with Java3D 1.5.
Java3D is currently at 1.4.0 stable and has a 1.5 dev version out. The key to all of this is that the 1.5 branch includes the ability to use JOGL to bind the Java3D API to the native OpenGL implementation. What does this provide? Well, since JOGL is already ported to OSX, we can install Java3D 1.5 and JOGL and upgrade our outdated Java3D!
how to do it
Prerequisites
- Java 1.5
- Mac OS 10.4
Procedure
- Download the windows binary of Java3D 1.5 from the Java 3D site
- Replace the three jars (j3dcore.jar, j3dutils.jar, vecmath.jar) located in /System/Library/Java/Extensions with the ones in the java3d download. You can back up your old jars to easily revert.
- Download JOGL (now called Java Bindings for the OpenGL API). They have a PPC and universal download, as it's a JNI library
- Extract the jogl-natives-macosx-[ppc|universal].jar and copy libjogl.jnilib, libjogl_awt.jnilib, and libjogl_cg.jnilib to /System/Library/Java/Extensions. Make sure to copy jogl.jar here also.
- Optional: Test out your install by downloading the j3d-examples
Have fun with all the new features!
5 Comments
Leave a comment
0 TrackBacks
Listed below are links to blogs that reference this entry: Java3D 1.5 on Mac OS X.
TrackBack URL for this entry: http://www.nearinfinity.com/mt/mt-tb.cgi/457



Hi Jason,
I've also tried to use J3D with the JOGL-pipeline, but I ran into troubles: No matter what I do, always get an
"java.lang.UnsatisfiedLinkError: System/Library/Java/Extensions/libjogl_cg.jnilib"
Sure the file is in the correct path. I can do an
System.loadLibrary("jogl") or System.loadLibrary("jogl_awt") without any proplem. But the *$%¤$$ jogl_cg JNI-library can't get loaded...
Can you give me a hint on that?
Kind regards
Philipp
Hi Jason,
Myself (and others) are having problems with applications hanging using Java3D under OS X 10.4. There is a thread open on the Java3D forums if you can help out:
http://forums.java.net/jive/thread.jspa?threadID=16825&tstart=0
Cheers,
Dave
Philipp:
I don't have an nvidia card, so I can't run the CG shader demos. So, if the libjogl_cg.jnilib is in your /System/Library/Java/Extensions and you have a card that supports the cg shader language, it should work.
Dave:
I haven't had any of those problems, but it looks like it might be resolved according to that thread.
It's a rather obvious step, but your install instructions should include the copying of jogl.jar to /System/Library/Java/Extensions.
Best regards,Joachim
Thanks Joachim, I'll add that.