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.pentaho.di.core.util
Class EnvUtil

    java.lang.Object
      org.pentaho.di.core.util.EnvUtil

    public class EnvUtil

extends Object

Constructor Summary
`EnvUtil()`

Method Summary
`static void` | `addInternalVariables(Properties prop)` Add a number of internal variables to the Kettle Variables at the root.
`static void` | `environmentInit()` Adds the kettle properties the the global system properties.
`static String[]` | `getEnvironmentVariablesForRuntimeExec()`
`static String` | `getSystemProperty(String key)`
`static String` | `getSystemProperty(String key, String def)` This method is written especially for weird JVM's like
`static String` | `getSystemPropertyStripQuotes(String key, String def)` This method is written especially for weird JVM's like IBM's on AIX and OS/400.
`static Properties` | `readProperties(String fileName)` Returns the properties from the users ketle home directory.

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

Constructor Detail

### EnvUtil

    public EnvUtil()

Method Detail

### readProperties

    public static Properties readProperties(String fileName)

  Returns the properties from the users ketle home directory.

  Parameters:
    `fileName` - the relative name of the properties file in the users kettle directory.
  Returns:
    the map of properties.

### environmentInit

    public static void environmentInit()

  Adds the kettle properties the the global system properties.

### addInternalVariables

    public static void addInternalVariables(Properties prop)

  Add a number of internal variables to the Kettle Variables at the root.

  Parameters:
    `variables` -

### getEnvironmentVariablesForRuntimeExec

    public static final String[] getEnvironmentVariablesForRuntimeExec()

  Returns:
    an array of strings, made up of all the environment variables available in the VM, format var=value. To be used for Runtime.exec(cmd, envp)

### getSystemPropertyStripQuotes

    public static final String getSystemPropertyStripQuotes(String key,
                                                            String def)

  This method is written especially for weird JVM's like IBM's on AIX and OS/400. On these platforms, we notice that environment variables have an extra double quote around it... This is messing up the ability to specify things.

  Parameters:
    `key` - The key, the name of the environment variable to return
    `def` - The default value to return in case the key can't be found
  Returns:
    The value of a System environment variable in the java virtual machine. If the key is not present, the variable is not defined and the default value is returned.

### getSystemProperty

    public static final String getSystemProperty(String key,
                                                 String def)

  This method is written especially for weird JVM's like

  Parameters:
    `key` - The key, the name of the environment variable to return
    `def` - The default value to return in case the key can't be found
  Returns:
    The value of a System environment variable in the java virtual machine. If the key is not present, the variable is not defined and the default value is returned.

### getSystemProperty

    public static final String getSystemProperty(String key)

  Parameters:
    `key` - The key, the name of the environment variable to return
  Returns:
    The value of a System environment variable in the java virtual machine. If the key is not present, the variable is not defined and null returned.

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