Package org.gradle.process
Interface JavaExecSpec
- All Superinterfaces:
- BaseExecSpec,- JavaForkOptions,- ProcessForkOptions
- All Known Implementing Classes:
- JavaExec
Specifies the options for executing a Java application.
- 
Method SummaryModifier and TypeMethodDescriptionAdds args for the main class to be executed.Adds args for the main class to be executed.Adds elements to the classpath for executing the main class.getArgs()Returns the arguments passed to the main class to be executed.Argument providers for the application.Returns the classpath for executing the main class.Extra JVM arguments to be to use to launch the JVM for the process.The fully qualified name of the Main class to be executed.The name of the main module to be executed if the application should run as a Java module.Returns the module path handling for executing the main class.Sets the args for the main class to be executed.Sets the args for the main class to be executed.setClasspath(FileCollection classpath) Sets the classpath for executing the main class.default JavaExecSpecDeprecated.Methods inherited from interface org.gradle.process.BaseExecSpecgetCommandLine, getErrorOutput, getStandardInput, getStandardOutput, isIgnoreExitValue, setErrorOutput, setIgnoreExitValue, setStandardInput, setStandardOutputMethods inherited from interface org.gradle.process.JavaForkOptionsbootstrapClasspath, copyTo, debugOptions, getAllJvmArgs, getBootstrapClasspath, getDebug, getDebugOptions, getDefaultCharacterEncoding, getEnableAssertions, getJvmArgs, getJvmArgumentProviders, getMaxHeapSize, getMinHeapSize, getSystemProperties, jvmArgs, jvmArgs, setAllJvmArgs, setAllJvmArgs, setBootstrapClasspath, setDebug, setDefaultCharacterEncoding, setEnableAssertions, setJvmArgs, setJvmArgs, setMaxHeapSize, setMinHeapSize, setSystemProperties, systemProperties, systemPropertyMethods inherited from interface org.gradle.process.ProcessForkOptionscopyTo, environment, environment, executable, getEnvironment, getExecutable, getWorkingDir, setEnvironment, setExecutable, setExecutable, setWorkingDir, setWorkingDir, workingDir
- 
Method Details- 
getJvmArgumentsExtra JVM arguments to be to use to launch the JVM for the process. Must be used to set a convention for JVM arguments.- Since:
- 8.1
 
- 
getMainModuleThe name of the main module to be executed if the application should run as a Java module.- Since:
- 6.4
 
- 
getMainClassThe fully qualified name of the Main class to be executed.This does not need to be set if using an Executable Jar with a Main-Classattribute.- Since:
- 6.4
 
- 
setMainDeprecated.UsegetMainClass().set(main) instead. This method will be removed in Gradle 9.0.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
 
- 
getArgsReturns the arguments passed to the main class to be executed.
- 
argsAdds args for the main class to be executed.- Parameters:
- args- Args for the main class.
- Returns:
- this
 
- 
argsAdds args for the main class to be executed.- Parameters:
- args- Args for the main class.
- Returns:
- this
 
- 
setArgsSets the args for the main class to be executed.- Parameters:
- args- Args for the main class.
- Returns:
- this
- Since:
- 4.0
 
- 
setArgsSets the args for the main class to be executed.- Parameters:
- args- Args for the main class.
- Returns:
- this
 
- 
getArgumentProvidersList<CommandLineArgumentProvider> getArgumentProviders()Argument providers for the application.- Since:
- 4.6
 
- 
classpathAdds elements to the classpath for executing the main class.- Parameters:
- paths- classpath elements
- Returns:
- this
 
- 
getClasspathReturns the classpath for executing the main class.
- 
setClasspathSets the classpath for executing the main class.- Parameters:
- classpath- the classpath
- Returns:
- this
 
- 
getModularityModularitySpec getModularity()Returns the module path handling for executing the main class.- Since:
- 6.4
 
 
- 
getMainClass().set(main) instead.