code: public static String getEnvVariable( String name )
          throws EnvironmentException
      {
          if( isUnix() )
          {
              Properties properties = getUnixShellVariables();
              return properties.getProperty( name );
          }
          else if( isWindows() )
          {
              Properties properties = getWindowsShellVariables();
              return properties.getProperty( name );
          }
  
          String osName = System.getProperty( "os.name" );
          throw new EnvironmentException( name, "Non-supported operating system: " + osName );
      }
docs: Gets the value of a shell environment variable.
  
  @param name the name of variable
  
  @return the String representation of an environment variable value
  
  @throws EnvironmentException if there is a problem accessing the environment