public static boolean is64BitVM() {
String bits = System.getProperty("sun.arch.data.model");
if (bits != null) {
return bits.equals("64");
} else {
// probably sun.arch.data.model isn't available
// maybe not a Sun JVM?
// try with the vm.name property
return System.getProperty("java.vm.name").contains("64");
}
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/11023.html