public final class OperatingSystemUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
OperatingSystemUtils.DefaultEnvVarSource
Default implementation to load environment variables.
|
static interface |
OperatingSystemUtils.EnvVarSource
Defines the functionality to load a Map of environment variables.
|
| Modifier and Type | Method and Description |
|---|---|
static Properties |
getSystemEnvVars() |
static Properties |
getSystemEnvVars(boolean caseSensitive)
Return the shell environment variables.
|
static void |
setEnvVarSource(OperatingSystemUtils.EnvVarSource source)
Set the source object to load the environment variables from.
|
public static Properties getSystemEnvVars() throws IOException
IOExceptionpublic static Properties getSystemEnvVars(boolean caseSensitive) throws IOException
caseSensitive == true, then envar
keys will all be upper-case.caseSensitive - Whether environment variable keys should be treated case-sensitively.IOException - in case of an error.public static void setEnvVarSource(OperatingSystemUtils.EnvVarSource source)
source - the EnvVarSource instance that loads the environment variables.Copyright © 2001–2019 Codehaus Plexus. All rights reserved.