mirror of
https://github.com/SKCraft/Launcher.git
synced 2024-11-30 13:13:58 +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
|
// Add system Javas
|
||||||
runtimeFinder.getCandidateJavaLocations().stream()
|
runtimeFinder.getCandidateJavaLocations().stream()
|
||||||
.map(JavaRuntimeFinder::getRuntimeFromPath)
|
.map(JavaRuntimeFinder::getRuntimeFromPath)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
.forEach(entries::add);
|
.forEach(entries::add);
|
||||||
|
|
||||||
// Add extra runtimes
|
// Add extra runtimes
|
||||||
@ -95,6 +96,11 @@ public final class JavaRuntimeFinder {
|
|||||||
binFolder = new File(target, "jre/bin");
|
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());
|
JavaReleaseFile release = JavaReleaseFile.parseFromRelease(releaseFile.getParentFile());
|
||||||
if (release == null) {
|
if (release == null) {
|
||||||
// Make some assumptions...
|
// Make some assumptions...
|
||||||
|
Loading…
Reference in New Issue
Block a user