# JavaExecSpec

interface JavaExecSpec : JavaForkOptions, BaseExecSpec(source)

Specifies the options for executing a Java application.

#### Inheritors

JavaExec

## Functions

args
Link copied to clipboard
abstract fun args(args: Iterable<out Any>): JavaExecSpec
abstract fun args(args: Array<Any>): JavaExecSpec
Adds args for the main class to be executed.
bootstrapClasspath
Link copied to clipboard
abstract fun bootstrapClasspath(classpath: Array<Any>): JavaForkOptions
classpath
Link copied to clipboard
abstract fun classpath(paths: Array<Any>): JavaExecSpec
Adds elements to the classpath for executing the main class.
copyTo
Link copied to clipboard
abstract fun copyTo(options: JavaForkOptions): JavaForkOptions
abstract fun copyTo(options: ProcessForkOptions): ProcessForkOptions
debugOptions
Link copied to clipboard
abstract fun debugOptions(action: Action<JavaDebugOptions>)
environment
Link copied to clipboard
abstract fun environment(environmentVariables: Map<String, out Any>): ProcessForkOptions
environment
Link copied to clipboard
inline fun ProcessForkOptions.environment(vararg environmentVariables: Pair<String, Any?>): ProcessForkOptions

Kotlin extension function for org.gradle.process.ProcessForkOptions.environment.

executable
Link copied to clipboard
abstract fun executable(executable: Any): ProcessForkOptions
getAllJvmArgs
Link copied to clipboard
abstract fun getAllJvmArgs(): List<String>
getArgs
Link copied to clipboard
@Nullable
@Optional
@Input
abstract fun getArgs(): List<String>
Returns the arguments passed to the main class to be executed.
getArgumentProviders
Link copied to clipboard
abstract fun getArgumentProviders(): List<CommandLineArgumentProvider>
Argument providers for the application.
getBootstrapClasspath
Link copied to clipboard
abstract fun getBootstrapClasspath(): FileCollection
getClasspath
Link copied to clipboard
@Classpath
abstract fun getClasspath(): FileCollection
Returns the classpath for executing the main class.
getCommandLine
Link copied to clipboard
abstract fun getCommandLine(): List<String>
getDebug
Link copied to clipboard
abstract fun getDebug(): Boolean
getDebugOptions
Link copied to clipboard
abstract fun getDebugOptions(): JavaDebugOptions
getDefaultCharacterEncoding
Link copied to clipboard
abstract fun getDefaultCharacterEncoding(): String
getEnableAssertions
Link copied to clipboard
abstract fun getEnableAssertions(): Boolean
getEnvironment
Link copied to clipboard
abstract fun getEnvironment(): Map<String, Any>
getErrorOutput
Link copied to clipboard
abstract fun getErrorOutput(): OutputStream
getExecutable
Link copied to clipboard
abstract fun getExecutable(): String
getJvmArgs
Link copied to clipboard
abstract fun getJvmArgs(): List<String>
getJvmArgumentProviders
Link copied to clipboard
abstract fun getJvmArgumentProviders(): List<CommandLineArgumentProvider>
getJvmArguments
Link copied to clipboard
@Incubating
@Optional
@Internal
abstract fun getJvmArguments(): ListProperty<String>
Extra JVM arguments to be to use to launch the JVM for the process.
getMainClass
Link copied to clipboard
@Optional
@Input
abstract fun getMainClass(): Property<String>
The fully qualified name of the Main class to be executed.
getMainModule
Link copied to clipboard
@Optional
@Input
abstract fun getMainModule(): Property<String>
The name of the main module to be executed if the application should run as a Java module.
getMaxHeapSize
Link copied to clipboard
abstract fun getMaxHeapSize(): String
getMinHeapSize
Link copied to clipboard
abstract fun getMinHeapSize(): String
getModularity
Link copied to clipboard
abstract fun getModularity(): ModularitySpec
Returns the module path handling for executing the main class.
getStandardInput
Link copied to clipboard
abstract fun getStandardInput(): InputStream
getStandardOutput
Link copied to clipboard
abstract fun getStandardOutput(): OutputStream
getSystemProperties
Link copied to clipboard
abstract fun getSystemProperties(): Map<String, Any>
getWorkingDir
Link copied to clipboard
abstract fun getWorkingDir(): File
isIgnoreExitValue
Link copied to clipboard
abstract fun isIgnoreExitValue(): Boolean
jvmArgs
Link copied to clipboard
abstract fun jvmArgs(arguments: Iterable<out Any>): JavaForkOptions
setAllJvmArgs
Link copied to clipboard
abstract fun setAllJvmArgs(arguments: List<String>)
setArgs
Link copied to clipboard
abstract fun setArgs(@Nullable args: Iterable<out Any>): JavaExecSpec
abstract fun setArgs(@Nullable args: List<String>): JavaExecSpec
Sets the args for the main class to be executed.
setBootstrapClasspath
Link copied to clipboard
abstract fun setBootstrapClasspath(classpath: FileCollection)
setClasspath
Link copied to clipboard
abstract fun setClasspath(classpath: FileCollection): JavaExecSpec
Sets the classpath for executing the main class.
setDebug
Link copied to clipboard
abstract fun setDebug(enabled: Boolean)
setDefaultCharacterEncoding
Link copied to clipboard
abstract fun setDefaultCharacterEncoding(defaultCharacterEncoding: String)
setEnableAssertions
Link copied to clipboard
abstract fun setEnableAssertions(enabled: Boolean)
setEnvironment
Link copied to clipboard
abstract fun setEnvironment(environmentVariables: Map<String, out Any>)
setEnvironment
Link copied to clipboard
inline fun ProcessForkOptions.setEnvironment(vararg environmentVariables: Pair<String, Any?>)

Kotlin extension function for org.gradle.process.ProcessForkOptions.setEnvironment.

setErrorOutput
Link copied to clipboard
abstract fun setErrorOutput(outputStream: OutputStream): BaseExecSpec
setExecutable
Link copied to clipboard
abstract fun setExecutable(executable: String)
setIgnoreExitValue
Link copied to clipboard
abstract fun setIgnoreExitValue(ignoreExitValue: Boolean): BaseExecSpec
setJvmArgs
Link copied to clipboard
abstract fun setJvmArgs(arguments: List<String>)
setMain
Link copied to clipboard
@ReplacedBy(value = "mainClass")
open fun setMain(@Nullable main: String): JavaExecSpec
Sets the fully qualified name of the main class to be executed.
setMaxHeapSize
Link copied to clipboard
abstract fun setMaxHeapSize(heapSize: String)
setMinHeapSize
Link copied to clipboard
abstract fun setMinHeapSize(heapSize: String)
setStandardInput
Link copied to clipboard
abstract fun setStandardInput(inputStream: InputStream): BaseExecSpec
setStandardOutput
Link copied to clipboard
abstract fun setStandardOutput(outputStream: OutputStream): BaseExecSpec
setSystemProperties
Link copied to clipboard
abstract fun setSystemProperties(properties: Map<String, out Any>)
setWorkingDir
Link copied to clipboard
abstract fun setWorkingDir(dir: File)
systemProperties
Link copied to clipboard
abstract fun systemProperties(properties: Map<String, out Any>): JavaForkOptions
systemProperties
Link copied to clipboard
inline fun JavaForkOptions.systemProperties(vararg properties: Pair<String, Any?>): JavaForkOptions

Kotlin extension function for org.gradle.process.JavaForkOptions.systemProperties.

systemProperty
Link copied to clipboard
abstract fun systemProperty(name: String, value: Any): JavaForkOptions
workingDir
Link copied to clipboard
abstract fun workingDir(dir: Any): ProcessForkOptions