public static String getExternalVariable ( String var ) { String value = System . getProperty ( var ) ; if ( StringUtilities . isEmpty ( value ) ) { value = System . getenv ( var ) ; } return StringUtilities . isEmpty ( value ) ? null : value ; }
Fetch value from environment variable and if not set then fetch from System properties . If neither available return null .