Hey guys. I feel like I have something stupid going on here that I can’t see (JAR signing is fun I heard!)
I have an applet that is self-certified (multiple jars including slick, lwjgl, kryonet etc - all self-certified) and I can run it locally in my browser (by adding the file path in which I’m running from locally to my Java Exception List).
The issue arises when I port all of the jar files (and HTML to start the applet) to my website and try to run the applet.
I get so far as to this point without crashing going all the way through the LWJGL loading page:
Missing Application-Name manifest attribute for: http://mywebgame.com/lwjgl_util_applet.jar
Missing Permissions manifest attribute in main jar: http://mywebgame.com/lwjgl_util_applet.jar
Checking version
Determining packages to load
Calculating download size
Checking for updates
Downloading packages
Extracting downloaded packages
Extracting downloaded packages
Validating packages
Updating classpath
Switching applet
Missing Application-Name manifest attribute for: file:/C:/Users/-snip-/AppData/Local/Temp/lwjglcache/my%20web%20game/slick.jar
Initializing real applet
I am then prompted with a Java Application Blocked pop-up as follows:
http://puu.sh/ihRaF/3bfa6c8be7.png
After hitting OK to that pop-up, this is what the Java Console looks like (and everything is crashed):
[spoiler]
----------------------------------------------------
Missing Application-Name manifest attribute for: http://mywebgame.com/lwjgl_util_applet.jar
Missing Permissions manifest attribute in main jar: http://mywebgame.com/lwjgl_util_applet.jar
Checking version
Determining packages to load
Calculating download size
Checking for updates
Downloading packages
Extracting downloaded packages
Extracting downloaded packages
Validating packages
Updating classpath
Switching applet
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.lwjgl.util.applet.AppletLoader$4.getPermissions(AppletLoader.java:1206)
at java.security.SecureClassLoader.getProtectionDomain(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:1319)
at org.lwjgl.util.applet.AppletLoader$2.run(AppletLoader.java:909)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.sun.deploy.security.BlockedException: The application was blocked even though the host site of the html file at: http://mywebgame.com/ is included in the Exception Site List because the application refers to resources on multiple domains.
The jar file at file:/C:/Users/-snip-/AppData/Local/Temp/lwjglcache/my%20web%20game/slick.jar is on a different domain and is not also included on the Exception Site List.
at com.sun.deploy.security.BlockedDialog.show(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.getPermissions(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getPermissions(Unknown Source)
... 31 more
Caused by: com.sun.deploy.security.BlockedException: The application was blocked even though the host site of the html file at: http://mywebgame.com/ is included in the Exception Site List because the application refers to resources on multiple domains.
The jar file at file:/C:/Users/-snip-/AppData/Local/Temp/lwjglcache/my%20web%20game/slick.jar is on a different domain and is not also included on the Exception Site List.
at com.sun.deploy.security.ruleset.RuleId.isException(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDefaultOrException(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
at sun.plugin2.applet.Applet2Manager.getMainDeploymentRuleSet(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getDeploymentRuleSet(Unknown Source)
... 34 more
Caused by: java.lang.Exception
... 40 more
Initializing real applet
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.lwjgl.util.applet.AppletLoader$4.getPermissions(AppletLoader.java:1206)
at java.security.SecureClassLoader.getProtectionDomain(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.newdawn.slick.AppletGameContainer.init(AppletGameContainer.java:124)
at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:1330)
at org.lwjgl.util.applet.AppletLoader$2.run(AppletLoader.java:909)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.sun.deploy.security.BlockedException: The application was blocked even though the host site of the html file at: http://mywebgame.com/ is included in the Exception Site List because the application refers to resources on multiple domains.
The jar file at file:/C:/Users/-snip-/AppData/Local/Temp/lwjglcache/my%20web%20game/client.jar is on a different domain and is not also included on the Exception Site List.
at com.sun.deploy.security.BlockedDialog.show(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.getPermissions(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getPermissions(Unknown Source)
... 34 more
Caused by: com.sun.deploy.security.BlockedException: The application was blocked even though the host site of the html file at: http://mywebgame.com/ is included in the Exception Site List because the application refers to resources on multiple domains.
The jar file at file:/C:/Users/-snip-/AppData/Local/Temp/lwjglcache/my%20web%20game/client.jar is on a different domain and is not also included on the Exception Site List.
at com.sun.deploy.security.ruleset.RuleId.isException(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDefaultOrException(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
at sun.plugin2.applet.Applet2Manager.getMainDeploymentRuleSet(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getDeploymentRuleSet(Unknown Source)
... 37 more
Caused by: java.lang.Exception
... 43 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.lwjgl.util.applet.AppletLoader$4.getPermissions(AppletLoader.java:1206)
at java.security.SecureClassLoader.getProtectionDomain(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.mywebgame.client.core.Engine.<clinit>(Engine.java:64)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.newdawn.slick.AppletGameContainer.init(AppletGameContainer.java:124)
at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:1330)
at org.lwjgl.util.applet.AppletLoader$2.run(AppletLoader.java:909)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.sun.deploy.security.BlockedException: The application was blocked even though the host site of the html file at: http://mywebgame.com/ is included in the Exception Site List because the application refers to resources on multiple domains.
The jar file at file:/C:/Users/-snip-/AppData/Local/Temp/lwjglcache/my%20web%20game/kryonet-2.21-all.jar is on a different domain and is not also included on the Exception Site List.
at com.sun.deploy.security.BlockedDialog.show(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.getPermissions(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getPermissions(Unknown Source)
... 35 more
Caused by: com.sun.deploy.security.BlockedException: The application was blocked even though the host site of the html file at: http://mywebgame.com/ is included in the Exception Site List because the application refers to resources on multiple domains.
The jar file at file:/C:/Users/-snip-/AppData/Local/Temp/lwjglcache/my%20web%20game/kryonet-2.21-all.jar is on a different domain and is not also included on the Exception Site List.
at com.sun.deploy.security.ruleset.RuleId.isException(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDefaultOrException(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
at sun.plugin2.applet.Applet2Manager.getMainDeploymentRuleSet(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getDeploymentRuleSet(Unknown Source)
... 38 more
Caused by: java.lang.Exception
... 44 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.lwjgl.util.applet.AppletLoader$4.getPermissions(AppletLoader.java:1206)
at java.security.SecureClassLoader.getProtectionDomain(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.newdawn.slick.AppletGameContainer.init(AppletGameContainer.java:126)
at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:1330)
at org.lwjgl.util.applet.AppletLoader$2.run(AppletLoader.java:909)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.sun.deploy.security.BlockedException: The application was blocked even though the host site of the html file at: http://mywebgame.com/ is included in the Exception Site List because the application refers to resources on multiple domains.
The jar file at file:/C:/Users/-snip-/AppData/Local/Temp/lwjglcache/my%20web%20game/lwjgl.jar is on a different domain and is not also included on the Exception Site List.
at com.sun.deploy.security.BlockedDialog.show(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.isTrustedByTrustDecider(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.getPermissions(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getPermissions(Unknown Source)
... 32 more
Caused by: com.sun.deploy.security.BlockedException: The application was blocked even though the host site of the html file at: http://mywebgame.com/ is included in the Exception Site List because the application refers to resources on multiple domains.
The jar file at file:/C:/Users/-snip-/AppData/Local/Temp/lwjglcache/my%20web%20game/lwjgl.jar is on a different domain and is not also included on the Exception Site List.
at com.sun.deploy.security.ruleset.RuleId.isException(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDefaultOrException(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.getDRS(Unknown Source)
at com.sun.deploy.security.ruleset.DeploymentRuleSet.findDRS(Unknown Source)
at sun.plugin2.applet.Applet2Manager.getMainDeploymentRuleSet(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getDeploymentRuleSet(Unknown Source)
... 35 more
Caused by: java.lang.Exception
... 41 more
This occurred while 'Initializing real applet'
null
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at org.lwjgl.util.applet.AppletLoader.run(AppletLoader.java:906)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
at org.lwjgl.Sys.createImplementation(Sys.java:124)
at org.lwjgl.Sys.<clinit>(Sys.java:111)
at org.newdawn.slick.GameContainer.getTime(GameContainer.java:453)
at org.newdawn.slick.GameContainer.<init>(GameContainer.java:100)
at org.newdawn.slick.AppletGameContainer$Container.<init>(AppletGameContainer.java:249)
at org.newdawn.slick.AppletGameContainer.init(AppletGameContainer.java:126)
at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:1330)
at org.lwjgl.util.applet.AppletLoader$2.run(AppletLoader.java:909)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "org.lwjgl.util.Debug" "read")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at java.lang.Boolean.getBoolean(Unknown Source)
at org.lwjgl.LWJGLUtil$4.run(LWJGLUtil.java:454)
at org.lwjgl.LWJGLUtil$4.run(LWJGLUtil.java:452)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.LWJGLUtil.getPrivilegedBoolean(LWJGLUtil.java:452)
at org.lwjgl.LWJGLUtil.<clinit>(LWJGLUtil.java:265)
... 22 more
[/spoiler]
Note: there is some reflection in the application (perhaps that is a no-no?)
LWJGL Version 2.9.1
Not sure what version of Slick
The weirdest thing for me is that the exact same zip of everything runs in my browser locally, but after downloading it and running it from a website I am hit with this error.
Also curious if purchasing a digital jar signing certificate would solve this issue.