java.security.AccessControlException: access denied
843807Sep 9 2010 — edited Oct 6 2010Hai ,
I am getting the following error! when am running my applet on bowser ,My applet class contains file access code ,
java.security.AccessControlException: access denied (java.io.FilePermission
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.canRead(Unknown Source)
at com.esri.arcgis.sample.HelloSwingApplet.init(HelloSwingApplet.java:35)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
But the same code is working in appletviewer by using following command ,
**applettviewer -J-Djava.security.policy=java.policy.applet MyApplet.html**
So, tell me how to give permission when running applet on browser..
Thanks in advance ,
Arockia