I am getting a file permmission error when I use my Java applet on my website. The error is:
access denied ("java.io.FilePermision""image.png""read")
I am getting a file permmission error when I use my Java applet on my website. The error is:
access denied ("java.io.FilePermision""image.png""read")
An applet operates in a restricted environment (known as a security sandbox) and,unless it is signed, can only load resources from the same location from where it was loaded. The images can be included in the applet jar file. To access these, you could use
Image image = ImageIO.read(MyApplet.class.getResourceAsStream("/images/image.png"));
Applets are by default denied from accessing the client's file I/O. You need to sign your applet or edit the policy files.
You can check How Can An Applet Read Files On The Local File System