java.lang.Object |
↳ |
com.pnfsoftware.jeb.util.base.Env |
Class Overview
Helper to retrieve system environment variables or, as a fallback, local environment variables
provided by a Bash interactive shell.
Summary
Fields |
public
static
boolean |
useCaching |
caching is disabled by default |
Public Constructors |
|
Env()
|
Public Methods |
static
String
|
get(String varname)
Retrieve an environment variable.
|
static
String
|
getsafe(String varname)
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Fields
public
static
boolean
useCaching
caching is disabled by default
Public Constructors
Public Methods
public
static
String
get
(String varname)
Retrieve an environment variable. First, the system's environment is checked via
getenv(String)
. If no variable is found, and the user is running on a
non-Windows platform with a Bash, the method attempts to retrieve the variable defined by an
interactive terminal session.
Returns
- the value, null if the variable does not exist
Throws
NullPointerException
| if the variable name is null
|
public
static
String
getsafe
(String varname)
Throws
NullPointerException
| if the variable name is null
|