Mac OS Java Update ( 1.6.0_20) breaks JOGL/LWJGL applets

Hi all,

I’m not even sure where to post this anymore, but it’s seems pretty bad to me so I am cross-posting this from:
http://jogamp.762907.n3.nabble.com/Mac-OS-Java-Update-1-6-0-20-breaks-JOGL-applets-tp827857ef762907.html

Sorry in advance if this is wrong place.

Hi all,

It seems that the latest Mac OS Java update break JOGL applets, which our product uses :-(.
On this site in fact you can see the applets no longer work if you just installed the latest release from Apple…

More than just posting the news, I will try to give some info to help with sorting this mess out :slight_smile:
I will attempt to open page:
http://jogamp.org/jogl-demos/www/applettest-jnlp.html

First off, when going to the applet a new (at least for Mac users) dialog pops up, the “Welcome to the Java Extension Installer”. Yikes! This just about scares my users out of their pants, as before the JNLP-applet process was as clean as a Flash app, no dialog, no install, just run. OUCH.

Second, after clicking though that dialog, it say “error” in the applet due to security issues and the console has this dump:
ava.lang.reflect.InvocationTargetException
at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(DeployAWTUtil.java:116)
at sun.plugin2.applet.Plugin2Manager.runOnEDT(Plugin2Manager.java:3415)
at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:2967)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1444)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.SecurityException: attempted to open sandboxed jar http://jogamp.org/deployment/webstart/jogl.all.cdc.jar as a Trusted-Library
at com.sun.deploy.security.CPCallbackHandler$ParentElement.checkResource(CPCallbackHandler.java:354)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(DeployURLClassPath.java:790)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(DeployURLClassPath.java:980)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(DeployURLClassPath.java:896)
at com.sun.deploy.security.DeployURLClassPath.getResource(DeployURLClassPath.java:231)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Plugin2ClassLoader.java:796)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Plugin2ClassLoader.java:785)
at sun.plugin2.applet.JNLP2ClassLoader.findClass(JNLP2ClassLoader.java:317)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
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$12.run(Plugin2Manager.java:2955)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
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

  1. After going into Java Preferences, setting “Run Applets: In their own process” and under ADVANCED tab setting security to “Disable - insecure, not recommended” and rerunning, we now get this:

VALIDATE: libjogl_cg.jnilib
java.io.IOException: Cannot validate certificate for libjogl_cg.jnilib
at org.jdesktop.applet.util.JNLPAppletLauncher.validateCertificates(JNLPAppletLauncher.java:1815)
at org.jdesktop.applet.util.JNLPAppletLauncher.processNativeJar(JNLPAppletLauncher.java:1579)
at org.jdesktop.applet.util.JNLPAppletLauncher.initResources(JNLPAppletLauncher.java:1350)
at org.jdesktop.applet.util.JNLPAppletLauncher.initAndStartApplet(JNLPAppletLauncher.java:1254)
at org.jdesktop.applet.util.JNLPAppletLauncher.access$000(JNLPAppletLauncher.java:658)
at org.jdesktop.applet.util.JNLPAppletLauncher$1.run(JNLPAppletLauncher.java:907)
May 18, 2010 8:10:31 PM org.jdesktop.applet.util.JNLPAppletLauncher displayError
SEVERE: java.io.IOException: Cannot validate certificate for libjogl_cg.jnilib

I hope you can reproduce this, and I hope this is the right place to post this kind of thing!
Thanks for any help.

Shawn Kendall
IMILabs

answer on the other side :slight_smile:

This is a discussion started there now, but basically they are punting, saying that this stuff is old JOGL and they don’t maintain it.

So, I guess I would then ask, where to look for the JOGL peeps now.

Is JOGL really dead?

I just installed the 1.6.0_20 release on my Mac and it appears to have broken LWJGL applets everywhere. I haven’t had a chance to test it yet on Windows though. Is there anyway to fix it?

On a good note… Java applets now work in Chrome on Mac!!! I am VERY excited about that!

Seems Jogl is also effected: http://www.java-gaming.org/index.php/topic,22445.msg0/topicseen.html#new

Looks like LWJGL is also effected : http://www.java-gaming.org/index.php/topic,22447.0.html
:-\

I just tried it out on Windows, and LWJGL applets seem to work fine… just needs a fix for the Mac.

Hey, actually, I posted a good test matrix over at the LWJGL dev forums as well. (OS/Browser/security settings)

Java (applets) is broke but good on Macs now :(((((((.

hmm, firstly it doesn’t help too much that there are so many forum posts spread everywhere about this problem, (jogl forums, lwjgl forums, jogl and lwjgl sections here on jgo). A mod should at least on jgo merge the topics since its essentially the same problem and we (lwjgl and jogl) will have better luck working together at a centralised place.

As not many ppl (including dev’s on lwjgl/jogl) have macs, we’ll need to rely on you mac ppl to help :slight_smile:

Now we should first try to narrow the problem down to see if its related to :

  1. the rumoured macs plugin2 change where CoreGraphics is forced, see here

  2. Implementing the security model that was forced on windows/linux users in Java 6u18, to verify this go to the Java Control Panel -> Click Advanced Tab -> Security -> Click Mixed Code -> Check Disable and try a LWJGL/JOGL applet to see if it works.

  3. Do other Signed Java Applets work? (other than opengl ones)

As for applets still working in firefox I’m guessing this is related to Firefox useing a 3rd party Java Embedding Plugin (on mac) http://javaplugin.sourceforge.net/Readme.html while Safari uses Apple’s proprietary plugin interface. Not sure what Chrome is using.

what kappa said, but I want to emphasize that we already updated our code and applet to “work” on u20 :persecutioncomplex:

This sounds sort of like:
http://www.java-gaming.org/index.php/topic,22230.0.html

when most other OS’s upgraded to 1.6_u19

It is that but also this: http://www.java-gaming.org/index.php/topic,22167.0.html

Even when the security fixes are made (and then super crappy dialog goes up :frowning: ), and everything loads and runs fine, the applet frame is just white. The native rendering is going off-screen it seems.

Well, the person running JavaFX at Oracle is John Burkey. I would assume that most of the changes today are to support the JavaFX initiative. As John is listed as the architect behind JavaFX now, you should really e-mail him for the answers. If anyone hears anything, let the community know!

No offense Chris, but what would we say…

“Apple released it’s own Java update that broke this (now) third party, open source, native code based, extension I use, oh yeah, but only in applets is it broke. Can you look into it for me?”

:slight_smile:

On a serious note, this is pretty off branch, I can’t see Oracle/Sun giving a crap and over on their forums there has been some (related) posts going on for several months and no engineer responses. (could post link if anyone cares)

'Been chasing this dream for long time, I have to say looking pretty damn bleak…

Our best course for redress is to talk to the Apple team responsible for the maintenance of Java on OSX and ask them to start including JOGL and LWJGL tests as part of their build process. They shouldn’t just break working deployed code like that - whether we’re open sourced or not.

Cas :slight_smile:

ok so you can confirm, that the main issue with JOGL/LWJGL applets now no longer working is that they are forcing offscreen rendering (CoreGraphics)? and that the security part works (Trust-Library in META-INF) ?

Is the source code for Apples plugin available? if so we could have a look to seeing if its possible to hack it and make it use the old classic rendering mode.

We could also request Apples Java Engineers to add something like a VM parameter that allows JOGL/LWJGL applets to work, anyone have any links to the forums or mailing lists they use?

Other than that it looks like we’re pretty much screwed on mac with no easy fix in sight. We could always use a popup window (native window) to get JOGL/LWJGL applets running but that defeats the advantage of having it embedded in the browser.

Not to be discouraging (even though I am) but Apple is not going to do anything. I was on there Java mailing list for years and even registered (paid) developer in their dev program. They don’t/can’t care about outside tech ESPECIALLY cross-platofrom stuff, other than pure HTML 5.0.

Minecraft appears to be working for me on mac with the latest java.

[quote]Notch$ java -version
java version “1.6.0_20”
Java™ SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot™ 64-Bit Server VM (build 16.3-b01-279, mixed mode)
[/quote]

Maybe the difference is that you don’t use the LWJGL certificate for LWJGL JARs, but use your own certificate for all JARs.

That’s my guess, too.