On 03/02/2016 08:45 PM, David Holmes wrote:
On 27/02/2016 2:56 AM, Marcus Lagergren wrote:
Hi!

Is it possible to override lib/security/local_policy on app level
without patching jdk distro?
i.e. -Duse.this.policy.jar= … or something?

Can’t find a way to do it

http://docs.oracle.com/javase/8/docs/technotes/guides/security/PolicyFiles.html


Specifying an Additional Policy File at Runtime

It is also possible to specify an additional or a different policy file
when invoking execution of an application. This can be done via the
"-Djava.security.policy" command line argument, which sets the value of
the java.security.policy property. For example, if you use

     java -Djava.security.manager -Djava.security.policy=someURL SomeApp

I believe Marcus is referring to local_policy.jar which is for enforcing import restrictions on cryptography.

This is not a security policy file so the above command line won't work.

There is no way to override it from the command line AFAIK.

Thanks,
Sean

Reply via email to