fix: enhance bitness detection on windows

This commit is contained in:
Connor Tumbleson 2019-11-19 06:26:16 -05:00 committed by Connor Tumbleson
parent f076def4c5
commit c1f9afe33c
1 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,12 @@ public class OSDetection {
}
public static boolean is64Bit() {
if (isWindows()) {
String arch = System.getenv("PROCESSOR_ARCHITECTURE");
String wow64Arch = System.getenv("PROCESSOR_ARCHITEW6432");
return arch != null && arch.endsWith("64") || wow64Arch != null && wow64Arch.endsWith("64");
}
return Bit.equalsIgnoreCase("64");
}