As part of my retro PC project I have some old Java applets I wanted to play in the browser. These applets haven’t been signed in oh… 20 years now.
Since we don’t really have to worry about security in this exercise, I’m going to disable the security policy altogether. The alternative is to re-sign them with an updated trust key.

Without this, applets can’t write to the filesystem unless they’re signed. You’ll see an error like: java.security.AccessControlException: access denied with a reason following it.

Steps

  1. Open your JRE installation folder, navigate to lib\security and look for a file called java.policy.

before

  1. Replace the contents of the file with:
grant {
    permission java.security.AllPermission;
}

after

  1. Refresh the applet page, it should work now.