Thank you to all contributors for reviving Java3d and sustaining JOGL. I'm trying Java3d 1.6.0 and JOGL 2.0 on Oracle JDK 1.7 on Mac OS X 10.8.2. I see this exception as my app tries to start up:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class javax.media.j3d.VirtualUniverse
Can anyone provide insight?
This is using jogl-all-noawt. With jogl-all-awt, I saw no exception at all, and what looked like a blocked thread, since my splash screen stayed up indefinitely. Which alternative is appropriate for use with Java3d?
Yes, I have all three. I've been using Java Web Start with Java3d for 7-8 years, and I hope to continue. Your installation instructions are not that useful to me in this context, I'm afraid.
Thanks for the pointer. It indicated a possible problem with one of the JARs w.r.t. my JNLP file or my JAR signing. However, I've double-checked all of that, and replaced the JARs with new signed copies, but still no luck.
I get the same problem whether I use Oracle's JDK 1.6 or Apple's JDK 1.6.
I note that VirtualUniverse.class is in the j3dcore.jar with all the other classes showing on my stacktrace. I also looked that the source for VirtualUniverse.java, and it appears to have no imports outside of the JRE. What exactly can be causing this NCDF?
Java3D has evolved a lot in this latest pre release, it cannot be deployed the same way than before but it is easier to use now. Maybe the native libraries can't be loaded. Have you forgotten those used by JOGL 2.0 (they are in several JARs)?
If you can get jvisualvm working instead, I'd be very interested in the thread dumps in your case
to see what threads are actually locking. If you're comfortable with jconsole, jstack is the tool to dump
out stack traces.
The upload worked, it looks like a deadlock between the Java3d renderer thread (trying to call getMaxFixedFunction) and the AWT Event thread which is doing some work trying to get the best configuration....pretty sure that's the QueryCanvas internally in JOGLPipeline. Pretty much what I expected,
but maybe others have a different idea.
The thread on which GraphicsConfigTemplate3D.getBestConfiguration() is called will be blocked until the Renderer instance will release it after finding the best configuration via JoglPipeline methods on the J3D-Renderer-x thread.
JoglPipeline.getBestConfiguration() calls JoglPipeline.getDefaultProfile() which calls GLProfile.getMaxFixedFunc(true) where in the deep JAWTUtil's static initializer calls EventQueue.invokeAndWait() if not invoked on the EDT.
So, if GraphicsConfigTemplate3D.getBestConfiguration() is called on the EDT (most likely in this case) a deadlock will arise because EventQueue.invokeAndWait() will never return. I can reproduce this behavior.
Short term work-around: Don't create a GraphicsConfiguration instance for Canvas3D by using a GraphicsConfigTemplate3D or calling SimpleUniverse. getPreferredConfiguration() on the EDT.
I suggest to introduce a member 'glProfile' instead of calling 'getDefaultProfile()' several times: