如何用Java编写判断当前操作系统是32位还是64位 注意:不是JDK
你可以试下这个办法,输出这些语句....
String arch = System.getProperty("os.arch");
String os= System.getProperty("os.name");
System.out.println(arch);
System.out.println(os);
下面是我的电脑信息
x86
Windows Vista
x86代表32位系统
x64代表64位系统
String propertiesValue = properties.getProperty("os.arch"); System.out.println("系统位数是:" + (propertiesValue.equals("x86") ? "32" : "64")); ———————————————— 版权声明:本文为CSDN博主「garbageNewbie」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 这个只是jre的版本是32位还是64位,不是真正的操作系统位数.