public abstract class JavaLocator
extends java.lang.Object
Created by covers1624 on 28/10/21.
| Modifier and Type | Class and Description |
|---|---|
static class |
JavaLocator.Builder
A Builder to build a
JavaLocator. |
| Modifier | Constructor and Description |
|---|---|
protected |
JavaLocator(boolean useJavaw) |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addJavaInstall(java.util.List<JavaInstall> installs,
@Nullable JavaInstall install) |
static JavaLocator.Builder |
builder()
Create a
JavaLocator.Builder for a JavaLocator for the current system. |
protected void |
findJavasInFolder(java.util.List<JavaInstall> installs,
java.nio.file.Path folder) |
abstract java.util.List<JavaInstall> |
findJavaVersions()
Performs the searching of Java installations.
|
protected java.nio.file.Path |
getJavaExecutable(java.nio.file.Path path) |
protected static java.util.List<java.nio.file.Path> |
listDir(java.nio.file.Path dir) |
public static JavaLocator.Builder builder()
JavaLocator.Builder for a JavaLocator for the current system.public abstract java.util.List<JavaInstall> findJavaVersions() throws java.io.IOException
The result of this should be cached.
This can be re-run at any time.
java.io.IOException - If an IO error occurred whilst searching folders, etc.protected void findJavasInFolder(java.util.List<JavaInstall> installs, java.nio.file.Path folder) throws java.io.IOException
java.io.IOExceptionprotected java.nio.file.Path getJavaExecutable(java.nio.file.Path path)
protected static void addJavaInstall(java.util.List<JavaInstall> installs, @Nullable @Nullable JavaInstall install)
protected static java.util.List<java.nio.file.Path> listDir(java.nio.file.Path dir)
throws java.io.IOException
java.io.IOException