public class EnvironmentUtils
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
static void |
addVariableToEnvironment(java.util.Map environment,
java.lang.String keyAndValue)
Add a key/value pair to the given environment.
|
static java.util.Map |
getProcEnvironment()
Find the list of environment variables for this process.
|
static java.lang.String[] |
toStrings(java.util.Map environment)
Get the variable list as an array.
|
public static java.lang.String[] toStrings(java.util.Map environment)
environment
- the environment to use, may be null
null
if and only if
the input map was null
public static java.util.Map getProcEnvironment() throws java.io.IOException
null
java.io.IOException
- the operation failedpublic static void addVariableToEnvironment(java.util.Map environment, java.lang.String keyAndValue)
environment
- the current environmentkeyAndValue
- the key/value pair