public class EnvironmentUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addVariableToEnvironment(Map<String,String> environment,
String keyAndValue)
Add a key/value pair to the given environment.
|
static Map<String,String> |
getProcEnvironment()
Find the list of environment variables for this process.
|
static String[] |
toStrings(Map<String,String> environment)
Get the variable list as an array.
|
public static String[] toStrings(Map<String,String> environment)
environment - the environment to use, may be nullnull if and only if
the input map was nullpublic static Map<String,String> getProcEnvironment() throws IOException
nullIOException - the operation failedpublic static void addVariableToEnvironment(Map<String,String> environment, String keyAndValue)
environment - the current environmentkeyAndValue - the key/value pairCopyright © 2014 The Apache Software Foundation. All rights reserved.