I am making a game in Java using the framework pulpcore, I keep getting this error:
java.security.AccessControlExecption: access denied ("java.io.FilePermission" "scores.dat" "read")
Anyone have any idea how to fix this? I know that it is something to do with polices but I have never used them before so have no idea how to fix this. Any help would be greatly appreciated.
It means that something has launched the JVM with a security manager that either forbids all opening of files on the file system or at least contrives to forbid opening your file. To resolve this, you need to read the source of the framework or discuss it with the authors. Once the security manager is in place, there's nothing (I think) that you can do about it. Of course, if you control the JVM launch, you can probably change the args to take it back out.
Comments indicate that this is an applet, so you are dealing with the browser's security management policies. You would need to sign the jar with a real certificate, and then you can grant it more permissions. In general, applets have no access to the file system. I think you need to talk to the authors of 'pulpcore'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With