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

## org.gradle.api.tasks
[Java] Class JavaExec

    java.lang.Object
      org.gradle.api.internal.AbstractTask
          org.gradle.api.DefaultTask
              org.gradle.api.internal.ConventionTask
                  org.gradle.api.tasks.JavaExec

All Implemented Interfaces:
  JavaExecSpec

    public class JavaExec
    extends org.gradle.api.internal.ConventionTask

Executes a Java application in a child process.

Authors:
  Hans Dockter

Field Summary

Fields inherited from class org.gradle.api.internal.ConventionTask
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION

Fields inherited from class DefaultTask
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION

Fields inherited from class org.gradle.api.internal.AbstractTask
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION

Constructor Summary
`JavaExec()`

Method Summary
`JavaExec` | `args(java.lang.Object args)` {@inheritDoc}
`JavaExecSpec` | `args(java.lang.Iterable args)` {@inheritDoc}
`JavaExec` | `bootstrapClasspath(java.lang.Object classpath)` {@inheritDoc}
`JavaExec` | `classpath(java.lang.Object paths)` {@inheritDoc}
`JavaExec` | `copyTo(JavaForkOptions options)` {@inheritDoc}
`JavaExec` | `copyTo(ProcessForkOptions target)` {@inheritDoc}
`JavaExec` | `environment(java.lang.String name, java.lang.Object value)` {@inheritDoc}
`JavaExec` | `environment(java.util.Map environmentVariables)` {@inheritDoc}
`JavaExec` | `executable(java.lang.Object executable)` {@inheritDoc}
`java.util.List` | `getAllJvmArgs()` {@inheritDoc}
`java.util.List` | `getArgs()` {@inheritDoc}
`FileCollection` | `getBootstrapClasspath()` {@inheritDoc}
`FileCollection` | `getClasspath()` {@inheritDoc}
`java.util.List` | `getCommandLine()` {@inheritDoc}
`boolean` | `getDebug()` {@inheritDoc}
`boolean` | `getEnableAssertions()` {@inheritDoc}
`java.util.Map` | `getEnvironment()` {@inheritDoc}
`java.io.OutputStream` | `getErrorOutput()` {@inheritDoc}
`java.lang.String` | `getExecutable()` {@inheritDoc}
`java.util.List` | `getJvmArgs()` {@inheritDoc}
`java.lang.String` | `getMain()` {@inheritDoc}
`java.lang.String` | `getMaxHeapSize()` {@inheritDoc}
`java.io.InputStream` | `getStandardInput()` {@inheritDoc}
`java.io.OutputStream` | `getStandardOutput()` {@inheritDoc}
`java.util.Map` | `getSystemProperties()` {@inheritDoc}
`java.io.File` | `getWorkingDir()` {@inheritDoc}
`boolean` | `isIgnoreExitValue()` {@inheritDoc}
`JavaExec` | `jvmArgs(java.lang.Iterable arguments)` {@inheritDoc}
`JavaExec` | `jvmArgs(java.lang.Object arguments)` {@inheritDoc}
`void` | `setAllJvmArgs(java.lang.Iterable arguments)` {@inheritDoc}
`JavaExec` | `setArgs(java.lang.Iterable applicationArgs)` {@inheritDoc}
`void` | `setBootstrapClasspath(FileCollection classpath)` {@inheritDoc}
`JavaExec` | `setClasspath(FileCollection classpath)` {@inheritDoc}
`void` | `setDebug(boolean enabled)` {@inheritDoc}
`void` | `setEnableAssertions(boolean enabled)` {@inheritDoc}
`void` | `setEnvironment(java.util.Map environmentVariables)` {@inheritDoc}
`JavaExec` | `setErrorOutput(java.io.OutputStream outputStream)` {@inheritDoc}
`void` | `setExecutable(java.lang.Object executable)` {@inheritDoc}
`JavaExecSpec` | `setIgnoreExitValue(boolean ignoreExitValue)` {@inheritDoc}
`void` | `setJvmArgs(java.lang.Iterable arguments)` {@inheritDoc}
`JavaExec` | `setMain(java.lang.String mainClassName)` {@inheritDoc}
`void` | `setMaxHeapSize(java.lang.String heapSize)` {@inheritDoc}
`JavaExec` | `setStandardInput(java.io.InputStream inputStream)` {@inheritDoc}
`JavaExec` | `setStandardOutput(java.io.OutputStream outputStream)` {@inheritDoc}
`void` | `setSystemProperties(java.util.Map properties)` {@inheritDoc}
`void` | `setWorkingDir(java.lang.Object dir)` {@inheritDoc}
`JavaExec` | `systemProperties(java.util.Map properties)` {@inheritDoc}
`JavaExec` | `systemProperty(java.lang.String name, java.lang.Object value)` {@inheritDoc}
`JavaExec` | `workingDir(java.lang.Object dir)` {@inheritDoc}

Methods inherited from class org.gradle.api.internal.ConventionTask
org.gradle.api.internal.ConventionTask#conventionMapping(java.lang.String, org.gradle.api.tasks.ConventionValue), org.gradle.api.internal.ConventionTask#getConventionMapping(), org.gradle.api.internal.ConventionTask#setConventionMapping(org.gradle.api.internal.ConventionMapping), org.gradle.api.internal.ConventionTask#setProperty(java.lang.String, java.lang.Object), org.gradle.api.internal.ConventionTask#toString(), org.gradle.api.internal.ConventionTask#compareTo(org.gradle.api.Task), org.gradle.api.internal.ConventionTask#compareTo(java.lang.Object), org.gradle.api.internal.ConventionTask#getName(), org.gradle.api.internal.ConventionTask#getActions(), org.gradle.api.internal.ConventionTask#setName(java.lang.String), org.gradle.api.internal.ConventionTask#getState(), org.gradle.api.internal.ConventionTask#getPath(), org.gradle.api.internal.ConventionTask#getLogger(), org.gradle.api.internal.ConventionTask#execute(), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#getDescription(), org.gradle.api.internal.ConventionTask#isEnabled(), org.gradle.api.internal.ConventionTask#captureStandardOutput(org.gradle.api.logging.LogLevel), org.gradle.api.internal.ConventionTask#disableStandardOutputCapture(), org.gradle.api.internal.ConventionTask#property(java.lang.String), org.gradle.api.internal.ConventionTask#setEnabled(boolean), org.gradle.api.internal.ConventionTask#setDescription(java.lang.String), org.gradle.api.internal.ConventionTask#getProject(), org.gradle.api.internal.ConventionTask#getGroup(), org.gradle.api.internal.ConventionTask#setGroup(java.lang.String), org.gradle.api.internal.ConventionTask#dependsOn([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#getAnt(), org.gradle.api.internal.ConventionTask#getConvention(), org.gradle.api.internal.ConventionTask#hasProperty(java.lang.String), org.gradle.api.internal.ConventionTask#getLogging(), org.gradle.api.internal.ConventionTask#getExtensions(), org.gradle.api.internal.ConventionTask#executeWithoutThrowingTaskFailure(), org.gradle.api.internal.ConventionTask#setActions(java.util.List), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#getDependsOn(), org.gradle.api.internal.ConventionTask#setDependsOn(java.lang.Iterable), org.gradle.api.internal.ConventionTask#onlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#onlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#setOnlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#setOnlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#setDidWork(boolean), org.gradle.api.internal.ConventionTask#getDidWork(), org.gradle.api.internal.ConventionTask#doFirst(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#doFirst(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#doLast(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#doLast(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#leftShift(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#deleteAllActions(), org.gradle.api.internal.ConventionTask#getEnabled(), org.gradle.api.internal.ConventionTask#dependsOnTaskDidWork(), org.gradle.api.internal.ConventionTask#getInputs(), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#getTemporaryDir(), org.gradle.api.internal.ConventionTask#setProject(org.gradle.api.Project), org.gradle.api.internal.ConventionTask#getStandardOutputCapture(), org.gradle.api.internal.ConventionTask#getAdditionalProperties(), org.gradle.api.internal.ConventionTask#getDynamicObjectHelper(), org.gradle.api.internal.ConventionTask#getAsDynamicObject(), org.gradle.api.internal.ConventionTask#addValidator(org.gradle.api.internal.tasks.execution.TaskValidator), org.gradle.api.internal.ConventionTask#getValidators(), org.gradle.api.internal.ConventionTask#getExecuter(), org.gradle.api.internal.ConventionTask#setExecuter(org.gradle.api.internal.tasks.TaskExecuter), org.gradle.api.internal.ConventionTask#getOnlyIf(), org.gradle.api.internal.ConventionTask#injectIntoNewInstance(org.gradle.api.internal.project.ProjectInternal, java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.ConventionTask#wait(long), org.gradle.api.internal.ConventionTask#wait(long, int), org.gradle.api.internal.ConventionTask#wait(), org.gradle.api.internal.ConventionTask#equals(java.lang.Object), org.gradle.api.internal.ConventionTask#hashCode(), org.gradle.api.internal.ConventionTask#getClass(), org.gradle.api.internal.ConventionTask#notify(), org.gradle.api.internal.ConventionTask#notifyAll()

Methods inherited from class DefaultTask
setProperty, toString, compareTo, compareTo, getName, getActions, setName, getState, getPath, getLogger, execute, configure, configure, getDescription, isEnabled, captureStandardOutput, disableStandardOutputCapture, property, setEnabled, setDescription, getProject, getGroup, setGroup, dependsOn, getAnt, getConvention, hasProperty, getLogging, getExtensions, executeWithoutThrowingTaskFailure, setActions, getTaskDependencies, getTaskDependencies, getDependsOn, setDependsOn, onlyIf, onlyIf, setOnlyIf, setOnlyIf, setDidWork, getDidWork, doFirst, doFirst, doLast, doLast, leftShift, deleteAllActions, getEnabled, dependsOnTaskDidWork, getInputs, getOutputs, getOutputs, getTemporaryDir, setProject, getStandardOutputCapture, getAdditionalProperties, getDynamicObjectHelper, getAsDynamicObject, addValidator, getValidators, getExecuter, setExecuter, getOnlyIf, injectIntoNewInstance, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll

Methods inherited from class org.gradle.api.internal.AbstractTask
org.gradle.api.internal.AbstractTask#setProperty(java.lang.String, java.lang.Object), org.gradle.api.internal.AbstractTask#toString(), org.gradle.api.internal.AbstractTask#compareTo(org.gradle.api.Task), org.gradle.api.internal.AbstractTask#compareTo(java.lang.Object), org.gradle.api.internal.AbstractTask#getName(), org.gradle.api.internal.AbstractTask#getActions(), org.gradle.api.internal.AbstractTask#setName(java.lang.String), org.gradle.api.internal.AbstractTask#getState(), org.gradle.api.internal.AbstractTask#getPath(), org.gradle.api.internal.AbstractTask#getLogger(), org.gradle.api.internal.AbstractTask#execute(), org.gradle.api.internal.AbstractTask#configure(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#configure(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#getDescription(), org.gradle.api.internal.AbstractTask#isEnabled(), org.gradle.api.internal.AbstractTask#captureStandardOutput(org.gradle.api.logging.LogLevel), org.gradle.api.internal.AbstractTask#disableStandardOutputCapture(), org.gradle.api.internal.AbstractTask#property(java.lang.String), org.gradle.api.internal.AbstractTask#setEnabled(boolean), org.gradle.api.internal.AbstractTask#setDescription(java.lang.String), org.gradle.api.internal.AbstractTask#getProject(), org.gradle.api.internal.AbstractTask#getGroup(), org.gradle.api.internal.AbstractTask#setGroup(java.lang.String), org.gradle.api.internal.AbstractTask#dependsOn([Ljava.lang.Object;), org.gradle.api.internal.AbstractTask#getAnt(), org.gradle.api.internal.AbstractTask#getConvention(), org.gradle.api.internal.AbstractTask#hasProperty(java.lang.String), org.gradle.api.internal.AbstractTask#getLogging(), org.gradle.api.internal.AbstractTask#getExtensions(), org.gradle.api.internal.AbstractTask#executeWithoutThrowingTaskFailure(), org.gradle.api.internal.AbstractTask#setActions(java.util.List), org.gradle.api.internal.AbstractTask#getTaskDependencies(), org.gradle.api.internal.AbstractTask#getTaskDependencies(), org.gradle.api.internal.AbstractTask#getDependsOn(), org.gradle.api.internal.AbstractTask#setDependsOn(java.lang.Iterable), org.gradle.api.internal.AbstractTask#onlyIf(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#onlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.AbstractTask#setOnlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.AbstractTask#setOnlyIf(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#setDidWork(boolean), org.gradle.api.internal.AbstractTask#getDidWork(), org.gradle.api.internal.AbstractTask#doFirst(org.gradle.api.Action), org.gradle.api.internal.AbstractTask#doFirst(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#doLast(org.gradle.api.Action), org.gradle.api.internal.AbstractTask#doLast(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#leftShift(groovy.lang.Closure), org.gradle.api.internal.AbstractTask#deleteAllActions(), org.gradle.api.internal.AbstractTask#getEnabled(), org.gradle.api.internal.AbstractTask#dependsOnTaskDidWork(), org.gradle.api.internal.AbstractTask#getInputs(), org.gradle.api.internal.AbstractTask#getOutputs(), org.gradle.api.internal.AbstractTask#getOutputs(), org.gradle.api.internal.AbstractTask#getTemporaryDir(), org.gradle.api.internal.AbstractTask#setProject(org.gradle.api.Project), org.gradle.api.internal.AbstractTask#getStandardOutputCapture(), org.gradle.api.internal.AbstractTask#getAdditionalProperties(), org.gradle.api.internal.AbstractTask#getDynamicObjectHelper(), org.gradle.api.internal.AbstractTask#getAsDynamicObject(), org.gradle.api.internal.AbstractTask#addValidator(org.gradle.api.internal.tasks.execution.TaskValidator), org.gradle.api.internal.AbstractTask#getValidators(), org.gradle.api.internal.AbstractTask#getExecuter(), org.gradle.api.internal.AbstractTask#setExecuter(org.gradle.api.internal.tasks.TaskExecuter), org.gradle.api.internal.AbstractTask#getOnlyIf(), org.gradle.api.internal.AbstractTask#injectIntoNewInstance(org.gradle.api.internal.project.ProjectInternal, java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.AbstractTask#wait(long), org.gradle.api.internal.AbstractTask#wait(long, int), org.gradle.api.internal.AbstractTask#wait(), org.gradle.api.internal.AbstractTask#equals(java.lang.Object), org.gradle.api.internal.AbstractTask#hashCode(), org.gradle.api.internal.AbstractTask#getClass(), org.gradle.api.internal.AbstractTask#notify(), org.gradle.api.internal.AbstractTask#notifyAll()

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Constructor Detail

### JavaExec

    public JavaExec()

Method Detail

### args

    public JavaExec args(java.lang.Object args)

  {@inheritDoc}

### args

    public JavaExecSpec args(java.lang.Iterable args)

  {@inheritDoc}

### bootstrapClasspath

    public JavaExec bootstrapClasspath(java.lang.Object classpath)

  {@inheritDoc}

### classpath

    public JavaExec classpath(java.lang.Object paths)

  {@inheritDoc}

### copyTo

    public JavaExec copyTo(JavaForkOptions options)

  {@inheritDoc}

### copyTo

    public JavaExec copyTo(ProcessForkOptions target)

  {@inheritDoc}

### environment

    public JavaExec environment(java.lang.String name, java.lang.Object value)

  {@inheritDoc}

### environment

    public JavaExec environment(java.util.Map environmentVariables)

  {@inheritDoc}

### executable

    public JavaExec executable(java.lang.Object executable)

  {@inheritDoc}

### getAllJvmArgs

    public java.util.List getAllJvmArgs()

  {@inheritDoc}

### getArgs

    public java.util.List getArgs()

  {@inheritDoc}

### getBootstrapClasspath

    @InputFiles
    public FileCollection getBootstrapClasspath()

  {@inheritDoc}

### getClasspath

    @InputFiles
    public FileCollection getClasspath()

  {@inheritDoc}

### getCommandLine

    public java.util.List getCommandLine()

  {@inheritDoc}

### getDebug

    public boolean getDebug()

  {@inheritDoc}

### getEnableAssertions

    public boolean getEnableAssertions()

  {@inheritDoc}

### getEnvironment

    public java.util.Map getEnvironment()

  {@inheritDoc}

### getErrorOutput

    public java.io.OutputStream getErrorOutput()

  {@inheritDoc}

### getExecutable

    public java.lang.String getExecutable()

  {@inheritDoc}

### getJvmArgs

    public java.util.List getJvmArgs()

  {@inheritDoc}

### getMain

    public java.lang.String getMain()

  {@inheritDoc}

### getMaxHeapSize

    public java.lang.String getMaxHeapSize()

  {@inheritDoc}

### getStandardInput

    public java.io.InputStream getStandardInput()

  {@inheritDoc}

### getStandardOutput

    public java.io.OutputStream getStandardOutput()

  {@inheritDoc}

### getSystemProperties

    public java.util.Map getSystemProperties()

  {@inheritDoc}

### getWorkingDir

    public java.io.File getWorkingDir()

  {@inheritDoc}

### isIgnoreExitValue

    public boolean isIgnoreExitValue()

  {@inheritDoc}

### jvmArgs

    public JavaExec jvmArgs(java.lang.Iterable arguments)

  {@inheritDoc}

### jvmArgs

    public JavaExec jvmArgs(java.lang.Object arguments)

  {@inheritDoc}

### setAllJvmArgs

    public void setAllJvmArgs(java.lang.Iterable arguments)

  {@inheritDoc}

### setArgs

    public JavaExec setArgs(java.lang.Iterable applicationArgs)

  {@inheritDoc}

### setBootstrapClasspath

    public void setBootstrapClasspath(FileCollection classpath)

  {@inheritDoc}

### setClasspath

    public JavaExec setClasspath(FileCollection classpath)

  {@inheritDoc}

### setDebug

    public void setDebug(boolean enabled)

  {@inheritDoc}

### setEnableAssertions

    public void setEnableAssertions(boolean enabled)

  {@inheritDoc}

### setEnvironment

    public void setEnvironment(java.util.Map environmentVariables)

  {@inheritDoc}

### setErrorOutput

    public JavaExec setErrorOutput(java.io.OutputStream outputStream)

  {@inheritDoc}

### setExecutable

    public void setExecutable(java.lang.Object executable)

  {@inheritDoc}

### setIgnoreExitValue

    public JavaExecSpec setIgnoreExitValue(boolean ignoreExitValue)

  {@inheritDoc}

### setJvmArgs

    public void setJvmArgs(java.lang.Iterable arguments)

  {@inheritDoc}

### setMain

    public JavaExec setMain(java.lang.String mainClassName)

  {@inheritDoc}

### setMaxHeapSize

    public void setMaxHeapSize(java.lang.String heapSize)

  {@inheritDoc}

### setStandardInput

    public JavaExec setStandardInput(java.io.InputStream inputStream)

  {@inheritDoc}

### setStandardOutput

    public JavaExec setStandardOutput(java.io.OutputStream outputStream)

  {@inheritDoc}

### setSystemProperties

    public void setSystemProperties(java.util.Map properties)

  {@inheritDoc}

### setWorkingDir

    public void setWorkingDir(java.lang.Object dir)

  {@inheritDoc}

### systemProperties

    public JavaExec systemProperties(java.util.Map properties)

  {@inheritDoc}

### systemProperty

    public JavaExec systemProperty(java.lang.String name, java.lang.Object value)

  {@inheritDoc}

### workingDir

    public JavaExec workingDir(java.lang.Object dir)

  {@inheritDoc}

Groovy Documentation