I'm trying to save a buffered image to a png file. I've used ImageIO.write(image, "png", file). When I run it I get "java.security.AccessControlException: access denied (java.io.FilePermission map delete)" I'm trying to save to map.png which is in the same folder as my applet.
06-12-2006, 04:13 AM
applet's may not write to harddisk. this is a security policy. what would happen, if any applet from the internet would have write-access to your harddisc?
make it an aplication or change your applet security policy.
easier way is to make an application from your applet.
06-16-2006, 11:17 AM
Well I don't know how to make an application, nor do I have the intention. However, I did find a tutorial at http://java.sun.com/developer/techni...curity/Signed/ for applets. I tried following it, but it seems my computer can't find the command 'keytool', along with several other vital commands. Why is this?
06-16-2006, 11:43 AM
keytool is located in the jdk\bin folder. perhaps you didn't configure the PATH variable properly.
06-16-2006, 10:12 PM
I got keytool to work eventually. For enabling file access I made a jar file of my project, and ran "keytool -genkey" to make a key thingy. Then I ran "keytool -selfcert" to make the certificate and then -jarsigner to sign the jar file with the certificate. However, this still does not let it open the file. Why is this?