# JavaForkOptions

interface JavaForkOptions : ProcessForkOptions(source)

Specifies the options to use to fork a Java process.

#### Inheritors

Test
JavaExecSpec

## Functions

bootstrapClasspath
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.
copyTo
Link copied to clipboard
abstract fun copyTo(options: JavaForkOptions): JavaForkOptions
Copies these options to the given options.
abstract fun copyTo(options: ProcessForkOptions): ProcessForkOptions
Copies these options to the given target options.
debugOptions
Link copied to clipboard
abstract fun debugOptions(action: Action<JavaDebugOptions>)
Configures Java Debug Wire Protocol properties for the process.
environment
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.
executable
Link copied to clipboard
abstract fun executable(executable: Any): ProcessForkOptions
Sets the name of the executable to use.
getAllJvmArgs
Link copied to clipboard
@Internal
abstract fun getAllJvmArgs(): Provider<List<String>>
Returns the full set of arguments to use to launch the JVM for the process.
getBootstrapClasspath
Link copied to clipboard
@Classpath
abstract fun getBootstrapClasspath(): ConfigurableFileCollection
Returns the bootstrap classpath to use for the process.
getDebug
Link copied to clipboard
@Input
abstract fun getDebug(): Property<Boolean>
Determines whether debugging is enabled for the test process.
getDebugOptions
Link copied to clipboard
abstract fun getDebugOptions(): JavaDebugOptions
Returns the Java Debug Wire Protocol properties for the process.
getDefaultCharacterEncoding
Link copied to clipboard
@Optional
@Input
abstract fun getDefaultCharacterEncoding(): Property<String>
Returns the default character encoding to use.
getEnableAssertions
Link copied to clipboard
@Input
@Optional
abstract fun getEnableAssertions(): Property<Boolean>
A flag that marks if assertions are enabled for the process.
getEnvironment
Link copied to clipboard
abstract fun getEnvironment(): MapProperty<String, Any>
The environment variables to use for the process.
getExecutable
Link copied to clipboard
abstract fun getExecutable(): Property<String>
Returns the name of the executable to use.
getJvmArgs
Link copied to clipboard
@Optional
@Input
abstract fun getJvmArgs(): ListProperty<String>
The extra arguments to use to launch the JVM for the process.
getJvmArgumentProviders
Link copied to clipboard
abstract fun getJvmArgumentProviders(): ListProperty<CommandLineArgumentProvider>
Command line argument providers for the java process to fork.
getMaxHeapSize
Link copied to clipboard
@Optional
@Input
abstract fun getMaxHeapSize(): Property<String>
Returns the maximum heap size for the process, if any.
getMinHeapSize
Link copied to clipboard
@Optional
@Input
abstract fun getMinHeapSize(): Property<String>
Returns the minimum heap size for the process, if any.
getSystemProperties
Link copied to clipboard
@Input
abstract fun getSystemProperties(): MapProperty<String, Any>
System properties which will be used for the process.
getWorkingDir
Link copied to clipboard
abstract fun getWorkingDir(): DirectoryProperty
Returns the working directory for the process.
jvmArgs
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.
systemProperties
Link copied to clipboard
abstract fun systemProperties(properties: Map<String, out @Nullable Any>): JavaForkOptions
Adds some system properties to use for the process.
systemProperty
Link copied to clipboard
abstract fun systemProperty(name: String, @Nullable value: @Nullable Any): JavaForkOptions
Adds a system property to use for the process.
workingDir
Link copied to clipboard
abstract fun workingDir(dir: Any): ProcessForkOptions
Sets the working directory for the process.