I have read that if the user denies access to the signed applet, then the applet will still run but will run in the sandbox. Unfortunately, I don't think this is the case for me. Within the applet's "init, start, stop, destroy" methods, I call "System.out.println("Made it here.");", which is not output to the Java Console. BTW - I always have the Java Console being shown; you can set it to do this in the Java Control Panel. The reason I need to determine this, is I would like to redirect the user to a new web page if the applet fails to load.
exception: exit(-1). ExitException[ 4]java.lang.RuntimeException: exit(-1) at com.sun.javaws.Main.systemExit(Unknown Source) at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(Unknown Source) at com.sun.javaws.LaunchDownload.checkSignedResourcesHelper(Unknown Source) at com.sun.javaws.LaunchDownload.checkSignedResources(Unknown Source) at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source) at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception: ExitException[ 4]java.lang.RuntimeException: exit(-1)
RhinoGuy wrote:But as you found out for yourself, that's incorrect.
I have read that if the user denies access to the signed applet, then the applet will still run but will run in the sandbox.
So, if anyone has any ideas about how to figure out if a signed applet is denied by the user, please reply to this thread.You look in the user's Java console and you see that error message. But presumably you meant to ask how the applet could tell. Well, since the applet doesn't start, there isn't any way for it to do anything at all.
Maybe it's easy to see the problem here. In this case, the reason the applet won't load when the user denies the certificate is because the MainApplet.class is derived from a "Trusted-Only" BaseApplet.class. Well, I suspect the ClassLoader won't load BaseApplet.class b/c the user denied the certificate, and we get my exception that is shown above.
Base.jar -> BaseApplet extends JApplet -> Base.jar is marked as "Trusted-Only" in it's manifest Main.jar -> MainApplet extends BaseApplet -> Main.jar uses Base.jar Base.jar and Main.jar are both signed with the same certificate.
RhinoGuy wrote:That is merely the (current) default behavior of the Oracle JRE, as I discovered on Does this applet work in an Iced Tea JRE?.
..I have read that if the user denies access to the signed applet, then the applet will still run but will run in the sandbox. ..
883649 wrote:Since I just realized that you:
well yea, i understand that, but I'm talking about the actual code.