Description
Add API in SystemUtils:
String getEnvironmentVariable(final String name, final String defaultValue)
Javadoc:
/** * <p> * Gets an environment variable, defaulting to {@code defaultValue} if the variable cannot be read. * </p> * <p> * If a {@code SecurityException} is caught, the return value is {@code defaultValue} and a message is written to * {@code System.err}. * </p> * * @param name * the environment variable name * @param defaultValue * the default value * @return the environment variable value or {@code defaultValue} if a security problem occurs * @since 3.8 */ public static String getEnvironmentVariable(final String name, final String defaultValue)