public static String tryGetGlobalProperty ( String key , String defaultValue ) { try { String value = System . getenv ( formatEnvironmentVariable ( key ) ) ; if ( value == null ) { value = tryGetProperty ( key , defaultValue ) ; } return value ; } catch ( SecurityException e ) { logger . error ( "Could not get value of global property {} due to SecurityManager. Using default value." , key , e ) ; return defaultValue ; } }
Get a global string property . This method will first try to get the value from an environment variable and if that does not exist it will look up a system property .