org.jruby.environment
Class OSEnvironment

java.lang.Object
  extended byorg.jruby.environment.OSEnvironment

public class OSEnvironment
extends java.lang.Object


Constructor Summary
OSEnvironment()
           
 
Method Summary
 java.util.Map getEnvironmentVariableMap(Ruby runtime)
          Returns the OS environment variables as a Map.
 java.util.Map getSystemPropertiesMap(Ruby runtime)
          Returns java system properties as a Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSEnvironment

public OSEnvironment()
Method Detail

getEnvironmentVariableMap

public java.util.Map getEnvironmentVariableMap(Ruby runtime)
Returns the OS environment variables as a Map. If the Java system property "jruby.env.method" is set then the value is used as the classname of a class than implements the IOSEnvironmentReader interface and the environment is obtained via this class. If the "jruby.env.method" is "org.jruby.environment.OSEnvironmentReaderFromFile" then the java system property "jruby.envfile" should give the location of a file from which the environment variables can be loaded. Otherwise, other default implementations of IOSEnvironmentReader are tried to obtain the os environment variables.

Parameters:
runtime -
Throws:
OSEnvironmentReaderExcepton

getSystemPropertiesMap

public java.util.Map getSystemPropertiesMap(Ruby runtime)
Returns java system properties as a Map.

Parameters:
runtime -
Returns:
the java system properties as a Map.


Copyright © 2002-2007 JRuby Team. All Rights Reserved.