简体   繁体   English

我怎么知道当前有效的java.policy

[英]how can i know the current java.policy in effect

I read from Java doc , the default location of java.policy is 我从Java doc中读取,java.policy的默认位置是

java.home\lib\security\java.policy

and user location is 并且用户位置是

user.home\.java.policy

But I also notice that a path in my Windows 但我也注意到Windows中的路径

C:\Users\<<myid>>\AppData\LocalLow\Sun\Java\Deployment\security

I like to edit java policy file in different location. 我喜欢在不同位置编辑Java策略文件。 How can I show the current java policy in effective? 如何显示当前有效的Java策略?

For example, type java.exe --show_me_all_permission_granted

Run Java with 使用运行Java

-Djava.security.debug=access,failure,policy

You will see all access failures and the protection domain for each, including its policy file source, and the permissions assigned from each policy file. 您将看到所有访问失败和每个访问失败的保护域,包括其策略文件源以及从每个策略文件分配的权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM