Console output
Some of the console output I see when I open the HTML seen below.
..
security: SSV validation: running: 1.7.0_25, requested: null, range: null
network: Created version ID: 1.7.0.25
network: Created version ID: 1.7.0.25
security: continue with running version
basic: exception: java.lang.ExceptionInInitializerError.
java.lang.RuntimeException: java.lang.ExceptionInInitializerError
...
Caused by: java.lang.ExceptionInInitializerError
at Snake.<init>(Snake.java:37)
...
Caused by: java.security.AccessControlException:
access denied ("java.lang.RuntimePermission" "exitVM.0")
... 26 more
basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@169a11f
security: Reset deny session certificate store
Analysis
Note particularly:
at Snake.<init>(Snake.java:37)
As well as:
..AccessControlException: access denied ("java.lang.RuntimePermission" "exitVM.0")
Possibly at line 37 of Snake.java
the code is doing something like:
jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
That will not be allowed, even in a trusted applet. An applet might share a VM with other applets.
If my prediction is correct, try instead:
jFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Otherwise, well.. For better help sooner, post an SSCCE. Or at least the first 37 lines of Snake.java
. :)
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<h1>Applet</h1>
<applet
code = "Snake"
archive = "Snake.jar"
height=300
width=300
codebase="https://sites.google.com/site/zmchenryfilecabinet/filecabinet/">
</applet>
</body>
</html>
Class caching
As an aside. If you are still having trouble with NCDFE (and in general with applet development).
To get around class/code caching during development, be sure to flush the class cache in the Java Console between test runs of software.