public class JdkInstallationManager
extends java.lang.Object
Created by covers1624 on 12/11/21.
| Modifier and Type | Class and Description |
|---|---|
static class |
JdkInstallationManager.Installation |
static interface |
JdkInstallationManager.JdkProvisioner
Responsible for provisioning a JDK.
|
static class |
JdkInstallationManager.ProvisionRequest |
static class |
JdkInstallationManager.ProvisionResult |
| Constructor and Description |
|---|
JdkInstallationManager(java.nio.file.Path baseDir,
JdkInstallationManager.JdkProvisioner provisioner)
Create a new Jdk Installation Manager.
|
| Modifier and Type | Method and Description |
|---|---|
@Nullable java.nio.file.Path |
findJdk(JavaVersion version,
@Nullable java.lang.String semver,
boolean jre,
boolean forceX64OnMac)
Find an existing JDK for the specified java Major version.
|
java.nio.file.Path |
provisionJdk(JdkInstallationManager.ProvisionRequest request)
Provision a JDK/JRE as per the request.
|
public JdkInstallationManager(java.nio.file.Path baseDir,
JdkInstallationManager.JdkProvisioner provisioner)
baseDir - The base directory to install JDK's to.provisioner - The provisioner to provision new JDK's.@Nullable public @Nullable java.nio.file.Path findJdk(JavaVersion version, @Nullable @Nullable java.lang.String semver, boolean jre, boolean forceX64OnMac)
version - The Java Major version to use.semver - An optional semver filter.jre - If a JRE is all that is required.forceX64OnMac - If Mac should force the use of x64 vms. Assumes rosetta support.null.public java.nio.file.Path provisionJdk(JdkInstallationManager.ProvisionRequest request) throws java.io.IOException
If one already exists. That will be returned instead.
request - The JdkInstallationManager.ProvisionRequest.java.io.IOException - Thrown if an error occurs whilst provisioning the JDK.