Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.exec.environment
Class DefaultProcessingEnvironment

    java.lang.Object
      org.apache.commons.exec.environment.DefaultProcessingEnvironment

Direct Known Subclasses:
  OpenVmsProcessingEnvironment

    public class DefaultProcessingEnvironment

extends Object

Helper class to determine the environment variable for the OS. Depending on the JDK the environment variables can be either retrieved directly from the JVM or requires starting a process to get them running an OS command line.

Field Summary
`protected Map` | `procEnvironment` the environment variables of the process

Constructor Summary
`DefaultProcessingEnvironment()`

Method Summary
`protected Map` | `createProcEnvironment()` Find the list of environment variables for this process.
`protected CommandLine` | `getProcEnvCommand()` Determine the OS specific command line to get a list of environment variables.
`Map` | `getProcEnvironment()` Find the list of environment variables for this process.
`protected BufferedReader` | `runProcEnvCommand()` Start a process to list the environment variables.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### procEnvironment

    protected Map procEnvironment

  the environment variables of the process

Constructor Detail

### DefaultProcessingEnvironment

    public DefaultProcessingEnvironment()

Method Detail

### getProcEnvironment

    public Map getProcEnvironment()
                           throws IOException

  Find the list of environment variables for this process.

  Returns:
    a map containing the environment variables
  Throws:
    `IOException` - obtaining the environment variables failed

### createProcEnvironment

    protected Map createProcEnvironment()
                                 throws IOException

  Find the list of environment variables for this process.

  Returns:
    a amp containing the environment variables
  Throws:
    `IOException` - the operation failed

### runProcEnvCommand

    protected BufferedReader runProcEnvCommand()
                                        throws IOException

  Start a process to list the environment variables.

  Returns:
    a reader containing the output of the process
  Throws:
    `IOException` - starting the process failed

### getProcEnvCommand

    protected CommandLine getProcEnvCommand()

  Determine the OS specific command line to get a list of environment variables.

  Returns:
    the command line

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.