我编写了我的java策略文件,将allPermission提供给jar说“xyz.jar”
grant codebase "file:lib/xyz.jar" {
permission java.security.AllPermission;
};
但是在执行程序时,我获得了属性权限的AccessControlException。此属性由jar中的类设置。
以下是进行策略调试的条目:
policy: evaluate codesources:
Policy CodeSource: (file:/C:/path/lib/xyz.jar <no signer certificates>)
Active CodeSource: (file:/C:/path/lib/log4j-1.2.9.jar <no signer certificates>)
policy: evaluation (codesource) failed
和
policy: evaluate codesources:
Policy CodeSource: (null <no signer certificates>)
Active CodeSource: (file:/C:/path/lib/xyz.jar <no signer certificates>)
policy: evaluate principals:
Policy Principals: [com.abc.MyLoginModule/principalA]
Active Principals: []
policy: evaluation (principals) failed
我哪里错了?