x86-64 平台上不自动选择 32 位 Java (#2042)

* close #2041

* update

* update
This commit is contained in:
Glavo 2023-02-06 22:49:37 +08:00 committed by GitHub
parent 9a3b8545ca
commit e76d520cac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -252,6 +252,10 @@ public enum JavaVersionConstraint {
JavaVersion mandatory = null;
JavaVersion suggested = null;
for (JavaVersion javaVersion : JavaVersion.getJavas()) {
// Do not automatically select 32-bit Java
if (Architecture.SYSTEM_ARCH == Architecture.X86_64 && javaVersion.getArchitecture() == Architecture.X86)
continue;
// select the latest x86 java that this version accepts.
if (forceX86 && !javaVersion.getArchitecture().isX86())
continue;