|
VTK Examples in Java | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvtk.util.VtkUtil
Simple utility class for retrieving values of environment variables.
SUN's recommended way of passing environment variables to Java VM is by use of
-D
option at command prompt, for instance, value of variable
VTK_DATA_ROOT can be passed like this:
java -DVTK_DATA_ROOT=${VTK_DATA_ROOT} Medical1Though recommended it is not always convenient. Methods in this class attempt to retrieve actual values of environment variables without use of
getVtkDataRoot
or
getEnvironmentVariable
may not work on all systems.
Method Summary | |
static java.lang.String |
getEnvironmentVariable(java.lang.String variableName)
Retrieves value of an environment variable. |
static java.lang.String |
getVtkDataRoot()
Convenience method for retrieving environment variable VTK_DATA_ROOT. |
static void |
printProperties()
Print all system properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String getEnvironmentVariable(java.lang.String variableName) throws java.lang.RuntimeException
-D
, for instance
java -DVTK_DATA_ROOT=${HOME}/src/VTKData Medical1
variableName
- Name of the variable to retrieve.
java.lang.RuntimeException
- when unable to retrieve value of requested variablepublic static java.lang.String getVtkDataRoot() throws java.lang.RuntimeException
java.lang.RuntimeException
- when unable to retrieve value of VTK_DATA_ROOTpublic static void printProperties()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |