Can't get my Java applet to work on Apache or other web server

Soldato
Joined
16 May 2008
Posts
2,579
Location
Bristol
I've written a small Java applet that works fine when I run it from a .html file on my local machine, but when I try to access it through Apache I get this error:

exception: Permission denied: null.
java.lang.SecurityException: Permission denied: null
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.SecurityException: Permission denied: null

I understand there is a security policy I need to implement but there doesn't seem to be a clear guide anywhere. I tried creating a file called security.policy containing:

grant {
permission java.io.FilePermission "<<ALL FILES>>","write";
};

And then I added this under "VM Options".

-Djava.security.manager -Djava.security.policy=security.policy

But it didn't work.

I'm using NetBeans if that makes any difference.
 
Back
Top Bottom