@Incubating @Deprecated public interface JavaInstallationRegistry
An instance of this service is available for injection into tasks, plugins and other types.
Modifier and Type | Method | Description |
---|---|---|
Provider<JavaInstallation> |
getInstallationForCurrentVirtualMachine() |
Deprecated.
Returns the Java installation for the current virtual machine.
|
Provider<JavaInstallation> |
installationForDirectory(Directory installationDirectory) |
Deprecated.
Returns information about the Java installation at the given location.
|
Provider<JavaInstallation> |
installationForDirectory(Provider<Directory> installationDirectory) |
Deprecated.
Returns information about the Java installation at the given location.
|
Provider<JavaInstallation> getInstallationForCurrentVirtualMachine()
Provider<JavaInstallation> installationForDirectory(Directory installationDirectory)
Note that this method may return an installation whose Java home directory is not the same as the installation directory. For example, if the given directory
points to a JRE installation contained within a JDK installation (as was the case for Java 8 and earlier), then the JavaInstallation
for outer installation will be returned.
installationDirectory
- The directory containing the Java installation.Provider<JavaInstallation> installationForDirectory(Provider<Directory> installationDirectory)
Note that this method may return an installation whose Java home directory is not the same as the installation directory. For example, if the given directory
points to a JRE installation contained within a JDK installation (as was the case for Java 8 and earlier), then the JavaInstallation
for outer installation will be returned.
installationDirectory
- The directory containing the Java installation.