Login  Register

Java3D applet tests on Mac OS X 10.7.5

Posted by adamsam on Nov 23, 2012; 9:43pm
URL: https://forum.jogamp.org/Java3D-applet-tests-on-Mac-OS-X-10-7-5-tp4027164.html

Hello there,

I would like to share problems I experienced with Java3D on Mac OS X 10.7.5. I have done plenty of tests trying to run Java applets that make use of Java3D from this page http://www.duling.us/kevin/Java3D/simple/First.html. I am pretty sure no other than intended libraries were being loaded (the only ones on my HD were residing in ~/Library/Java/Extensions/ and CLASSPATH environment variable was not set).

1) With Apple Java for OS X (Java SE 1.6.0_37) installed I got this exception:

java.lang.reflect.InvocationTargetException
        at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(DeployAWTUtil.java:116)
        at sun.plugin2.applet.Plugin2Manager.runOnEDT(Plugin2Manager.java:3541)
        at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3072)
        at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1497)
        at java.lang.Thread.run(Thread.java:680)
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.javax.media.j3d)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
        at java.security.AccessController.checkPermission(AccessController.java:549)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1512)
        at sun.plugin2.applet.Applet2SecurityManager.checkPackageAccess(Applet2SecurityManager.java:287)
        at java.lang.ClassLoader$1.run(ClassLoader.java:330)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.lang.ClassLoader.checkPackageAccess(ClassLoader.java:328)
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
        at java.lang.Class.getConstructor0(Class.java:2699)
        at java.lang.Class.newInstance0(Class.java:326)
        at java.lang.Class.newInstance(Class.java:308)
        at sun.plugin2.applet.Plugin2Manager$13.run(Plugin2Manager.java:3060)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:702)
        at java.awt.EventQueue.access$400(EventQueue.java:82)
        at java.awt.EventQueue$2.run(EventQueue.java:663)
        at java.awt.EventQueue$2.run(EventQueue.java:661)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:672)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception: java.lang.reflect.InvocationTargetException

This exception was occurring with Java3D 1.6.0-pre3* + JOGL from 2.0-rc08 to 2.0-rc11 or latest automatic build of JOGL 2.0 (b857 was tested) with GlueGen 2.0 (b608 was tested) or http://jogamp.org/deployment/jogamp-current/archive/jogamp-all-platforms.7z . Also Java3D 1.6.0-pre1/1.5.2/1.5.1/1.5.0 + JOGL 1.1.1a with GlueGen 1.0b6 did the same as would probably do other combinations.


2) With Oracle JRE 7 (Java SE 7 Update 09) installed I got one of these exceptions:

java.lang.NoClassDefFoundError: Could not initialize class javax.media.j3d.VirtualUniverse (happened always after applet reload or page refresh no matter what combination of Java3D + JOGL was used)
java.lang.NoClassDefFoundError: javax/media/nativewindow/CapabilitiesImmutable (Java3D 1.5.0/1.6.0-pre3* + JOGL 2.0-rc11/-rc08)
java.lang.NoClassDefFoundError: javax/media/opengl/GLException (Java3D 1.6.0-pre1/1.5.2 + JOGL 2.0-rc11/-rc08)
java.lang.NoClassDefFoundError: javax/media/opengl/GLCapabilitiesChooser (Java3D 1.5.2/1.5.1 + JOGL 2.0-rc11)
java.lang.NoClassDefFoundError: javax/media/opengl/GLDrawable (Java3D 1.5.0/1.6.0-pre1 + JOGL 2.0-rc11/-rc08)
java.lang.NoClassDefFoundError: javax/media/opengl/GL (Java3D 1.5.0/1.6.0-pre3* + JOGL 2.0-rc11/-rc08)
java.lang.NoClassDefFoundError: javax/media/opengl/AbstractGraphicsDevice (Java3D 1.6.0-pre1/1.5.2/1.5.1/1.5.0 + jogamp-all-platforms.7z/JOGL 2.0-b857 with GlueGen 2.0-b608)

These were occurring quite at random but to some extent depending on which combination of Java3D + JOGL was used (as decribed in parenthesis, but this is not exhaustive list of combinations in which they occurred).

The only combinations that didn't throw an exception were:
• Java3D 1.6.0-pre3* + latest automatic builds of JOGL 2.0 (b857 and b853 were tested) with GlueGen 2.0 (b608 and b605 were tested) or http://jogamp.org/deployment/jogamp-current/archive/jogamp-all-platforms.7z but instead the whole applet crashed (blinked and disappeared) right away the Java splash screen was shown.
• Java3D Java3D 1.6.0-pre1/1.5.2/1.5.1/1.5.0 + JOGL 1.1.1a with GlueGen 1.0b6 but instead the applet lagged at Java splash screen and driven CPU usage towards 100% which could indicate that deadlock was happening (maybe related to messed QueryCanvas as discussed here: http://forum.jogamp.org/NCDF-problem-with-VirtualUniverse-td4027031.html)


I can only confirm that JOGL examples from http://jogamp.org/deployment/jogamp-next/jogl-test-applets.html which use .jar files hosted at http://jogamp.org/deployment/jogamp-next/jar/ (jogamp-next is currently alias for v2.0-rc11) are working fine on OS X 10.7.5 (Safari, Firefox and Opera) with Apple JRE 6 and Oracle JRE 7 too.

---
* the Java3D 1.6.0-pre3 I am referring to is @hharrison's fork from this github.