show warning on 32bit jre

This commit is contained in:
honfika@gmail.com
2016-02-27 16:29:58 +01:00
parent 94bb61c9b3
commit 1a0aa9c779
6 changed files with 50 additions and 18 deletions

View File

@@ -1406,4 +1406,26 @@ public class Helper {
lastIds.put(str, a);
return str + "_" + a;
}
public static boolean is64BitJre() {
String prop = System.getProperty("sun.arch.data.model");
return prop != null && prop.contains("64");
}
public static boolean is64BitOs() {
String arch = System.getenv("PROCESSOR_ARCHITECTURE");
String wow64Arch = System.getenv("PROCESSOR_ARCHITEW6432");
if (arch == null) {
return false;
}
return arch.endsWith("64")
|| wow64Arch != null && wow64Arch.endsWith("64");
}
public static void showOutOfMemoryWarning() {
}
}