api / org.gradle.tooling / LongRunningOperation / setJavaHome

setJavaHome

abstract fun setJavaHome(javaHome: File): LongRunningOperation

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.

Parameters

javaHome - to use for the Gradle process

Exceptions

IllegalArgumentException - when supplied javaHome is not a valid folder.

Return
this

Since
1.0-milestone-8