mirror of
https://github.com/SKCraft/Launcher.git
synced 2024-11-27 12:46:22 +01:00
Disregard Java runtimes that don't have a bin folder
This commit is contained in:
parent
3c4c38ea84
commit
8e1337d603
@ -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...
|
||||
|
Loading…
Reference in New Issue
Block a user