我已经编写了我的 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
我哪里错了?