Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.process
[Java] Interface JavaExecSpec

    org.gradle.process.JavaExecSpec
      org.gradle.process.ProcessForkOptions
          org.gradle.process.JavaForkOptions
              org.gradle.process.BaseExecSpec

All Superinterfaces:
  ProcessForkOptions, JavaForkOptions, BaseExecSpec

    public interface JavaExecSpec
    extends BaseExecSpec, JavaForkOptions

Specifies the options for executing a Java application.

Authors:
  Hans Dockter

Method Summary
`JavaExecSpec` | `args(java.lang.Object args)` Adds args for the main class to be executed.
`JavaExecSpec` | `args(java.lang.Iterable args)` Adds args for the main class to be executed.
`JavaExecSpec` | `classpath(java.lang.Object paths)` Adds elements to the classpath for executing the main class.
`java.util.List` | `getArgs()` Returns the arguments passed to the main class to be executed.
`FileCollection` | `getClasspath()` Returns the classpath for executing the main class.
`java.lang.String` | `getMain()` Returns the fully qualified name of the Main class to be executed.
`JavaExecSpec` | `setArgs(java.lang.Iterable args)` Sets the args for the main class to be executed.
`JavaExecSpec` | `setClasspath(FileCollection classpath)` Sets the classpath for executing the main class.
`JavaExecSpec` | `setMain(java.lang.String main)` Sets the fully qualified name of the main class to be executed.

Methods inherited from interface JavaForkOptions
bootstrapClasspath, copyTo, getAllJvmArgs, getBootstrapClasspath, getDebug, getEnableAssertions, getJvmArgs, getMaxHeapSize, getSystemProperties, jvmArgs, jvmArgs, setAllJvmArgs, setBootstrapClasspath, setDebug, setEnableAssertions, setJvmArgs, setMaxHeapSize, setSystemProperties, systemProperties, systemProperty

Methods inherited from interface BaseExecSpec
getCommandLine, getErrorOutput, getStandardInput, getStandardOutput, isIgnoreExitValue, setErrorOutput, setIgnoreExitValue, setStandardInput, setStandardOutput

Method Detail

### args

    public JavaExecSpec args(java.lang.Object args)

  Adds args for the main class to be executed.
  Parameters:
    `args` - Args for the main class.
  Returns:
    this

### args

    public JavaExecSpec args(java.lang.Iterable args)

  Adds args for the main class to be executed.
  Parameters:
    `args` - Args for the main class.
  Returns:
    this

### classpath

    public JavaExecSpec classpath(java.lang.Object paths)

  Adds elements to the classpath for executing the main class.
  Parameters:
    `paths` - classpath elements
  Returns:
    this

### getArgs

    public java.util.List getArgs()

  Returns the arguments passed to the main class to be executed.

### getClasspath

    public FileCollection getClasspath()

  Returns the classpath for executing the main class.

### getMain

    public java.lang.String getMain()

  Returns the fully qualified name of the Main class to be executed.

### setArgs

    public JavaExecSpec setArgs(java.lang.Iterable args)

  Sets the args for the main class to be executed.
  Parameters:
    `args` - Args for the main class.
  Returns:
    this

### setClasspath

    public JavaExecSpec setClasspath(FileCollection classpath)

  Sets the classpath for executing the main class.
  Parameters:
    `classpath` - the classpath
  Returns:
    this

### setMain

    public JavaExecSpec setMain(java.lang.String main)

  Sets the fully qualified name of the main class to be executed.
  Parameters:
    `main` - the fully qualified name of the main class to be executed.
  Returns:
    this

Groovy Documentation