public class EnvironmentUtils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
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 © 2022. All rights reserved.