diff --git a/launcher/src/main/java/com/skcraft/launcher/launch/runtime/JavaRuntimeFinder.java b/launcher/src/main/java/com/skcraft/launcher/launch/runtime/JavaRuntimeFinder.java index 456a075..01ecf2e 100644 --- a/launcher/src/main/java/com/skcraft/launcher/launch/runtime/JavaRuntimeFinder.java +++ b/launcher/src/main/java/com/skcraft/launcher/launch/runtime/JavaRuntimeFinder.java @@ -43,6 +43,7 @@ public final class JavaRuntimeFinder { // Add system Javas runtimeFinder.getCandidateJavaLocations().stream() .map(JavaRuntimeFinder::getRuntimeFromPath) + .filter(Objects::nonNull) .forEach(entries::add); // Add extra runtimes @@ -95,6 +96,11 @@ public final class JavaRuntimeFinder { binFolder = new File(target, "jre/bin"); } + if (!binFolder.isDirectory()) { + // No bin folder, this isn't a usable install + return null; + } + JavaReleaseFile release = JavaReleaseFile.parseFromRelease(releaseFile.getParentFile()); if (release == null) { // Make some assumptions...