Do not automatically select Java non for x86 and x86-64

This commit is contained in:
Glavo
2021-10-14 03:12:23 +08:00
committed by Yuhui Huang
parent 42a40a844a
commit 21e44bbc90
4 changed files with 31 additions and 9 deletions

View File

@@ -546,10 +546,8 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
memoryStatus.set(OperatingSystem.getPhysicalMemoryStatus().orElse(OperatingSystem.PhysicalMemoryStatus.INVALID));
Task.supplyAsync(JavaVersion::getJavas).thenAcceptAsync(Schedulers.javafx(), list -> {
boolean isX86 = (Architecture.SYSTEM_ARCH == Architecture.X86 || Architecture.SYSTEM_ARCH == Architecture.X86_64)
&& list.stream()
.map(java -> java.getPlatform().getArchitecture())
.allMatch(arch -> arch == Architecture.X86 || arch == Architecture.X86_64);
boolean isX86 = (Architecture.SYSTEM_ARCH.isX86())
&& list.stream().allMatch(java -> java.getArchitecture().isX86());
// boolean showSystem = list.stream().anyMatch(java -> java.getPlatform().getOperatingSystem() != OperatingSystem.CURRENT_OS);