我的机器是32位还是64位? Java是在我的机器上安装32位还是64位?
uname -a
产生:
Linux xhost 2.6.18-194.el5xen #1 SMP Tue Mar 16 22:01:26 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
java -version
产生:
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)
答案 0 :(得分:6)
java -version
在64位VM上看起来像这样(它明确地说是64位):
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
答案 1 :(得分:2)
您可以尝试java -d64 -version
如果它不是64位,你会得到类似的东西:
This Java instance does not support a 64-bit JVM.
Please install the desired version