Package com.pnfsoftware.jeb.util.base
Class Env
java.lang.Object
com.pnfsoftware.jeb.util.base.Env
Helper to retrieve system environment variables or, as a fallback, local environment variables
provided by a Bash interactive shell (on non-Windows systems).
-
Method Summary
-
Method Details
-
get
Retrieve an environment variable. First, the system's environment is checked viaSystem.getenv(String). If no variable is found, and the user is running on a non-Windows platform that hasBash, the method attempts to retrieve the variable defined by an interactive terminal session.- Parameters:
name- variable name- Returns:
- the value; null if the variable is not defined
-
getsafe
Retrieve an environment variable. First, the system's environment is checked viaSystem.getenv(String). If no variable is found, and the user is running on a non-Windows platform that hasBash, the method attempts to retrieve the variable defined by an interactive terminal session.- Parameters:
name- variable name- Returns:
- the value; an empty string if the variable is not defined
-