user1482015
user1482015

Reputation:

how can i know the current java.policy in effect

I read from Java doc, the default location of java.policy is

java.home\lib\security\java.policy

and user location is

user.home\.java.policy

But I also notice that a path in my Windows

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

I like to edit java policy file in different location. How can I show the current java policy in effective?

For example, type java.exe --show_me_all_permission_granted

Upvotes: 3

Views: 865

Answers (1)

user207421
user207421

Reputation: 310964

Run Java with

-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.

Upvotes: 0

Related Questions