@run main/policy ignores system default java.policy

Sean Mullan sean.mullan at oracle.com
Fri Jul 8 11:34:27 UTC 2016


On 07/07/2016 11:28 PM, Weijun Wang wrote:
> I know that a "@run main/policy=p" tag will be translated to
> -Djava.security.policy==p and the system default
> java.home/conf/security/java.policy will be ignored, and sometimes it's
> necessary to copy some lines from there to the test's own policy file.
>
> However, with more modules being de-privileged, the system default
> java.policy is becoming much longer, this means it's more likely to
> duplicate lines there into a test policy file. Sometimes this is not
> obvious.
>
> Is there a plan to allow the system default java.policy also be loaded?
> Maybe a new option name like "addpolicy"?

Use the new jtreg "java.security.policy=p" option. This will 
concatentate the specified policy with the configured system policy files.

--Sean



More information about the security-dev mailing list