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 null
null
if and only if
the input map was null
public static Map<String,String> getProcEnvironment() throws IOException
null
IOException
- the operation failedpublic static void addVariableToEnvironment(Map<String,String> environment, String keyAndValue)
environment
- the current environmentkeyAndValue
- the key/value pairCopyright © 2023 The Apache Software Foundation. All rights reserved.