Java System Properties
Quick Reference Guide

security.overridePropertiesFile Java Security Property

The security.overridePropertiesFile Java Security Property accepts an boolean value which determines if security properties can be overridden by those specified via the system property.

Default Value


Setting / Reading security.overridePropertiesFile at Runtime

You can set security.overridePropertiesFile at runtime with the following Java code:"security.overridePropertiesFile", "/path/to/");

Please note that the security.overridePropertiesFile value needs to be specified early, before the internal java classes are loaded that might use this value otherwise it will be ignored.

To read the value of security.overridePropertiesFile at runtime, you can use this Java code:

String propertyValue ="security.overridePropertiesFile");
if (propertyValue != null) {
    System.out.println("security.overridePropertiesFile = " + propertyValue);
} else {
    System.out.println("security.overridePropertiesFile was null");

Setting security.overridePropertiesFile on Startup

Be aware that security.overridePropertiesFile is not a Java System Property, it is a Java Security Property. Therefor you cannot set it from the command line using -Dsecurity.overridePropertiesFile. You have to set security.overridePropertiesFile in the properties file.