Specify multiple different policy files when invoking execution of an application in Java

694 views Asked by At

In the documentation and this it says 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

With this we can specify an additional policy file to consider if policy.allowSystemProperty is set to true. Is it possible to use and set multiple policy files this way.

ie. ex :

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

Or is there any other way to do that ?

0

There are 0 answers