Overview | Package | Class | Tree | Deprecated | Index | Help
| Groovy JDK

## java.lang
Class String[]

Method Summary
`Process` | `execute()` Executes the command specified by the given `String` array.
`Process` | `execute(String[] envp, File dir)` Executes the command specified by the `String` array given in the first parameter, with the environment defined by `envp` and under the working directory `dir`.
`Process` | `execute(List envp, File dir)` Executes the command specified by the `String` array given in the first parameter, with the environment defined by `envp` and under the working directory `dir`.

Method Detail

### execute

    public Process execute()

  Executes the command specified by the given `String` array. The first item in the array is the command; the others are the parameters.

  For more control over Process construction you can use `java.lang.ProcessBuilder` (JDK 1.5+).

Returns:
  the Process which has just started for this command line representation.

Since:
  1.0

### execute

    public Process execute(String[] envp, File dir)

  Executes the command specified by the `String` array given in the first parameter, with the environment defined by `envp` and under the working directory `dir`. The first item in the array is the command; the others are the parameters.

  For more control over Process construction you can use `java.lang.ProcessBuilder` (JDK 1.5+).

Parameters:
  `envp` - an array of Strings, each member of which has environment variable settings in the format name=value, or `null` if the subprocess should inherit the environment of the current process..
  `dir` - the working directory of the subprocess, or `null` if the subprocess should inherit the working directory of the current process..

Returns:
  the Process which has just started for this command line representation.

Since:
  1.7.1

### execute

    public Process execute(List envp, File dir)

  Executes the command specified by the `String` array given in the first parameter, with the environment defined by `envp` and under the working directory `dir`. The first item in the array is the command; the others are the parameters.

  For more control over Process construction you can use `java.lang.ProcessBuilder` (JDK 1.5+).

Parameters:
  `envp` - a List of Objects (converted to Strings using toString), each member of which has environment variable settings in the format name=value, or `null` if the subprocess should inherit the environment of the current process..
  `dir` - the working directory of the subprocess, or `null` if the subprocess should inherit the working directory of the current process..

Returns:
  the Process which has just started for this command line representation.

Since:
  1.7.1

Overview | Package | Class | Tree | Deprecated | Index | Help
| Groovy JDK