Just because I have seen conflicting messages regarding '=' vs '==' as in
-Djava.security.policy==my.policy
or
-Djava.security.policy=my.policy
.
The names of the default policy files
When the default implementation of the Policy class reads in permissions, it will read them from the URLs listed as this set of properties:
policy.url.1=file:${java.home}/lib/security/java.policy
policy.url.2=file:${user.home}/.java.policy
You may specify any number of files in this manner, but the list must start at 1 and be numbered consecutively. The set of permissions will be the aggregate of all permissions found in these URLs.
Remember that these URLs contain only global permissions. You may also specify on the command line a file containing policies with the -Djava.security.policy argument. If the name following the -Djava.security.policy argument begins with an equals sign, the URLs listed in the java.security file are ignored:
-Djava.security.policy=/globals/java.policy (NO APPEND)
adds the policies in the /globals/java.policy file to the set of policies in force, but:
-Djava.security.policy==/globals/java.policy (APPEND AFTER policy.url's listed in java.security)
sets the policy only to the entries contained in the /globals/java.policy file. The -Djava.security.policy argument must be with the -Djava.security.manager; if you want to use only the files listed in the java.security file, specify -Djava.security.manager without -Djava.security.policy.
Other implementations of the Policy class may or may not use these properties.
No comments:
Post a Comment