JavaExecSpec

Specifies the options for executing a Java application.

Inheritors

Functions

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.
Link copied to clipboard
abstract fun bootstrapClasspath(@Nullable classpath: Array<@Nullable Any>): JavaForkOptions
Adds the given values to the end of the bootstrap classpath for the process.
Link copied to clipboard
abstract fun classpath(@Nullable paths: Array<@Nullable Any>): JavaExecSpec
Adds elements to the classpath for executing the main class.
Link copied to clipboard
abstract fun copyTo(options: JavaForkOptions): JavaForkOptions
Copies these options to the given options.
Copies these options to the given target options.
Link copied to clipboard
abstract fun debugOptions(action: Action<JavaDebugOptions>)
Configures Java Debug Wire Protocol properties for the process.
Link copied to clipboard
abstract fun environment(environmentVariables: Map<String, out Any>): ProcessForkOptions
Adds some environment variables to the environment for this process.
abstract fun environment(name: String, value: Any): ProcessForkOptions
Adds an environment variable to the environment for this process.
Link copied to clipboard
abstract fun executable(executable: Any): ProcessForkOptions
Sets the name of the executable to use.
Link copied to clipboard
Returns the full set of arguments to use to launch the JVM for the process.
Link copied to clipboard
abstract fun getArgs(): List<String>
Returns the arguments passed to the main class to be executed.
Link copied to clipboard
Argument providers for the application.
Link copied to clipboard
Returns the bootstrap classpath to use for the process.
Link copied to clipboard
Returns the classpath for executing the main class.
Link copied to clipboard
abstract fun getCommandLine(): List<String>
Returns the full command line, including the executable plus its arguments.
Link copied to clipboard
abstract fun getDebug(): Boolean
Determines whether debugging is enabled for the test process.
Link copied to clipboard
Returns the Java Debug Wire Protocol properties for the process.
Link copied to clipboard
@Nullable
abstract fun getDefaultCharacterEncoding(): @Nullable String
Returns the default character encoding to use.
Link copied to clipboard
Returns true if assertions are enabled for the process.
Link copied to clipboard
abstract fun getEnvironment(): Map<String, Any>
The environment variables to use for the process.
Link copied to clipboard
Returns the output stream to consume standard error from the process executing the command.
Link copied to clipboard
abstract fun getExecutable(): String
Returns the name of the executable to use.
Link copied to clipboard
Returns the extra arguments to use to launch the JVM for the process.
Link copied to clipboard
Command line argument providers for the java process to fork.
Link copied to clipboard
Extra JVM arguments to be to use to launch the JVM for the process.
Link copied to clipboard
The fully qualified name of the Main class to be executed.
Link copied to clipboard
The name of the main module to be executed if the application should run as a Java module.
Link copied to clipboard
@Nullable
abstract fun getMaxHeapSize(): @Nullable String
Returns the maximum heap size for the process, if any.
Link copied to clipboard
@Nullable
abstract fun getMinHeapSize(): @Nullable String
Returns the minimum heap size for the process, if any.
Link copied to clipboard
Returns the module path handling for executing the main class.
Link copied to clipboard
Returns the standard input stream for the process executing the command.
Link copied to clipboard
Returns the output stream to consume standard output from the process executing the command.
Link copied to clipboard
abstract fun getSystemProperties(): Map<String, @Nullable Any>
Returns the system properties which will be used for the process.
Link copied to clipboard
abstract fun getWorkingDir(): File
Returns the working directory for the process.
Link copied to clipboard
abstract fun isIgnoreExitValue(): Boolean
Tells whether a non-zero exit value is ignored, or an exception thrown.
Link copied to clipboard
abstract fun jvmArgs(arguments: Iterable<out Any>): JavaForkOptions
abstract fun jvmArgs(arguments: Array<Any>): JavaForkOptions
Adds some arguments to use to launch the JVM for the process.
Link copied to clipboard
abstract fun setAllJvmArgs(arguments: Iterable<out Any>)
abstract fun setAllJvmArgs(arguments: List<String>)
Sets the full set of arguments to use to launch the JVM for the process.
Link copied to clipboard
abstract fun setArgs(args: Iterable<out Any>): JavaExecSpec
abstract fun setArgs(args: List<String>): JavaExecSpec
Sets the args for the main class to be executed.
Link copied to clipboard
abstract fun setBootstrapClasspath(classpath: FileCollection)
Sets the bootstrap classpath to use for the process.
Link copied to clipboard
abstract fun setClasspath(classpath: FileCollection): JavaExecSpec
Sets the classpath for executing the main class.
Link copied to clipboard
abstract fun setDebug(enabled: Boolean)
Enable or disable debugging for the process.
Link copied to clipboard
abstract fun setDefaultCharacterEncoding(@Nullable defaultCharacterEncoding: @Nullable String)
Sets the default character encoding to use.
Link copied to clipboard
abstract fun setEnableAssertions(enabled: Boolean)
Enable or disable assertions for the process.
Link copied to clipboard
abstract fun setEnvironment(environmentVariables: Map<String, out Any>)
Sets the environment variable to use for the process.
Link copied to clipboard
abstract fun setErrorOutput(outputStream: OutputStream): BaseExecSpec
Sets the output stream to consume standard error from the process executing the command.
Link copied to clipboard
abstract fun setExecutable(executable: Any)
abstract fun setExecutable(executable: String)
Sets the name of the executable to use.
Link copied to clipboard
abstract fun setIgnoreExitValue(ignoreExitValue: Boolean): BaseExecSpec
Sets whether a non-zero exit value is ignored, or an exception thrown.
Link copied to clipboard
abstract fun setJvmArgs(arguments: Iterable<out Any>)
abstract fun setJvmArgs(arguments: List<String>)
Sets the extra arguments to use to launch the JVM for the process.
Link copied to clipboard
abstract fun setMaxHeapSize(@Nullable heapSize: @Nullable String)
Sets the maximum heap size for the process.
Link copied to clipboard
abstract fun setMinHeapSize(@Nullable heapSize: @Nullable String)
Sets the minimum heap size for the process.
Link copied to clipboard
abstract fun setStandardInput(inputStream: InputStream): BaseExecSpec
Sets the standard input stream for the process executing the command.
Link copied to clipboard
abstract fun setStandardOutput(outputStream: OutputStream): BaseExecSpec
Sets the output stream to consume standard output from the process executing the command.
Link copied to clipboard
abstract fun setSystemProperties(properties: Map<String, out @Nullable Any>)
Sets the system properties to use for the process.
Link copied to clipboard
abstract fun setWorkingDir(dir: File)
abstract fun setWorkingDir(dir: Any)
Sets the working directory for the process.
Link copied to clipboard
abstract fun systemProperties(properties: Map<String, out @Nullable Any>): JavaForkOptions
Adds some system properties to use for the process.
Link copied to clipboard
abstract fun systemProperty(name: String, @Nullable value: @Nullable Any): JavaForkOptions
Adds a system property to use for the process.
Link copied to clipboard
abstract fun workingDir(dir: Any): ProcessForkOptions
Sets the working directory for the process.