com.informationkinematics.imsforward
Class Environment

java.lang.Object
  |
  +--com.informationkinematics.imsforward.Environment

public class Environment
extends java.lang.Object

Title: Environment (based on code by OwenR's Environment.java)
Description: Finds the value of a given OS environment variable. Note: This class is platform-dependent and runs on Windows or Unix types only!
Copyright: Copyright (c) 2001 by Information Kinematics under GNU General Public License (see package description for more information)
Company: Information Kinematics

Version:
0.9.2
Author:
Florian Steinsiepe, Adrian Zaugg

Constructor Summary
Environment()
          Constructor is inactive.
 
Method Summary
 java.lang.String getEnvVariable(java.lang.String sEnvVarName)
          Returns the value of the OS' environment variable named sEnvVarName.
private  boolean isWindows()
          Returns the type of the operation system, as follows:
true: Windows family false: Others
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

Environment

public Environment()
Constructor is inactive.
Method Detail

getEnvVariable

public java.lang.String getEnvVariable(java.lang.String sEnvVarName)
                                throws EnvVarNotFoundException,
                                       java.io.IOException
Returns the value of the OS' environment variable named sEnvVarName. Supported OS' are: Unix and derivatives, Windows family. In case the OS isn't a Windows family member, doesn't understand the "env" command and doesn't store environment variables in the format "$VARNAME", an IOException is thrown.
Parameters:
sEnvVarName - java.lang.String

isWindows

private boolean isWindows()
Returns the type of the operation system, as follows:
true: Windows family false: Others
Returns:
boolean - true if OS name contains "Win", else false