Custom security policy without replacing files in the OpenJDK?

Sean Mullan sean.mullan at
Thu Mar 3 12:30:40 UTC 2016

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
> 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
> "" command line argument, which sets the value of
> the property. For example, if you use
>      java 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.


More information about the core-libs-dev mailing list