public final class OperatingSystemUtils
extends java.lang.Object
| Modifier and Type | Class | 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 | Description |
|---|---|---|
static java.util.Properties |
getSystemEnvVars() |
|
static java.util.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 java.util.Properties getSystemEnvVars()
throws java.io.IOException
java.io.IOExceptionpublic static java.util.Properties getSystemEnvVars(boolean caseSensitive)
throws java.io.IOException
caseSensitive == true, then envar
keys will all be upper-case.caseSensitive - Whether environment variable keys should be treated case-sensitively.java.io.IOException - in case of an error.public static void setEnvVarSource(OperatingSystemUtils.EnvVarSource source)
source - the EnvVarSource instance that loads the environment variables.Copyright © 2018. All rights reserved.