Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.security.AccessControlException: access denied

843807Sep 9 2010 — edited Oct 6 2010
Hai ,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 3 2010
Added on Sep 9 2010
4 comments
464 views