wood burning stoves 2.0*
The moose likes Applets and the fly likes java.lang.RuntimePermission getClassLoader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "java.lang.RuntimePermission getClassLoader" Watch "java.lang.RuntimePermission getClassLoader" New topic
Author

java.lang.RuntimePermission getClassLoader

Surya Kant
Ranch Hand

Joined: Mar 29, 2005
Posts: 104
I have one web application where i am using applet.The following exception is thrown in console & applet is not loading.
This issue is not frequent.Once in a month i get this.Does any one know about this problem?



java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
at com.company.team.report.condition.QuickApplet.init(QuickApplet.java:58)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) ???java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
at com.company.team.report.condition.QuickApplet.init(QuickApplet.java:58)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) ???java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42371
    
  64
Dealing with ClassLoaders is one of the things applets are forbidden to do in their security sandbox. See HowCanAnAppletReadFilesOnTheLocalFileSystem on how to get around that.


Ping & DNS - my free Android networking tools app
Surya Kant
Ranch Hand

Joined: Mar 29, 2005
Posts: 104
Hi
I have taken care all these aspects and it is working fine also.But why only sometimes it fails?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.RuntimePermission getClassLoader