开发者

Tracking down the source of java.security.AccessControlException

开发者 https://www.devze.com 2023-01-09 02:24 出处:网络
I have a Java applet which sometimes throws a java.security.AccessControlException whenever I call File.exists(). The problem goes away whenever I enclose the operation in开发者_C百科 an AccessControl

I have a Java applet which sometimes throws a java.security.AccessControlException whenever I call File.exists(). The problem goes away whenever I enclose the operation in开发者_C百科 an AccessController.doPrivileged() block. However, I can't figure out why. My applet is signed and should be fully trusted. In other scenarios, it can read/write to files without any problems.

Is there a way to walk up my calling stack and examine the effective permissions so that I can see who or what is trusted/untrusted?


You should enable java.security.debug property with access:stack first. It will help you understand what permission is lacking to the domain.

0

精彩评论

暂无评论...
验证码 换一张
取 消