Locates a Java Runtime with a given Version and presents it as an SDK.
The task attempts to locate a Java Runtime that matches the requirements placed via the parameters.
The returned object can be used as an SDK input to compilation and other tasks. (It can be used as the SDK input for Java in the saker.java.compile() task.)
Without any parameters, the task will return a reference to the JRE that the build execution is running on. In other cases it will attempt to find a matching JRE by checking the JRE paths in the saker.java.jre.install.locations environment property. The property holds a semicolon separated paths to the local JRE installations on the execution machine.
Summary
Version | Specifies the version(s) of the JRE that the task should look for. |
Parameters
Collection of JavaVersionNumber
Aliases:
Versions
Specifies the version(s) of the JRE that the task should look for. It will attempt to match the java.version system property of the possible JRE, or the Java release major version number. (In this order)
If no version is specified, the task will return the reference to the JRE that runs the build execution.