A Configuration implementation that reads the platform specific environment variables. On pre java5 JRE it uses Ant Execute task to read the environment. (in this case ant must be present in classpath). On java >= 5 JRE it uses {@link java.lang.System#getenv()} and ant is not required.
This configuration implementation is read-only. It allows read access to the defined OS environment variables, but their values cannot be changed.
Usage of this class is easy: After an instance has been created the get methods provided by the Configuration
interface can be used for querying environment variables, e.g.:
Configuration envConfig = new EnvironmentConfiguration(); System.out.println("JAVA_HOME=" + envConfig.getString("JAVA_HOME");@author Nicolas De Loof @see org.apache.tools.ant.taskdefs.Execute#getProcEnvironment() @since 1.5
A Configuration implementation that reads the platform specific environment variables using the map returned by {@link System#getenv()}.
This configuration implementation is read-only. It allows read access to the defined OS environment variables, but their values cannot be changed. Any attempts to add or remove a property will throw an {@link UnsupportedOperationException}
Usage of this class is easy: After an instance has been created the get methods provided by the {@code Configuration} interface can be usedfor querying environment variables, e.g.:
Configuration envConfig = new EnvironmentConfiguration(); System.out.println("JAVA_HOME=" + envConfig.getString("JAVA_HOME");@author Nicolas De Loof @version $Id: EnvironmentConfiguration.java 1624601 2014-09-12 18:04:36Z oheger $ @since 1.5
|
|
|
|