setJavaHome

abstract fun setJavaHome(@Nullable javaHome: File): LongRunningOperation(source)

Specifies the Java home directory to use for this operation.

org.gradle.tooling.model.build.BuildEnvironment model contains information such as Java or Gradle environment. If you want to get hold of this information you can ask tooling API to build this model.

If not configured or null is passed, then the sensible default will be used.

Return

this

Since

1.0-milestone-8

Parameters

javaHome

to use for the Gradle process

Throws

when supplied javaHome is not a valid folder.