我已经解决了类似的问题,但没有一个给出正确的工作答案 wrt 我的设置(其他问题的答案适用于 Windows 机器,64 位)。
我有以下设置:
$
$ uname -a
Linux localhost.localdomain 3.8.4-102.fc17.i686 #1 SMP Sun Mar 24 13:20:55 UTC 2013 i686 i686 i386 GNU/Linux
$
$ java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) Server VM (build 23.7-b01, mixed mode)
$
$ javac -version
javac 1.7.0_17
$
$
$ free -m
total used free shared buffers cached
Mem: 3520 3435 85 0 472 1531
-/+ buffers/cache: 1431 2089
Swap: 5567 0 5567
$
$
$ echo $JAVA_HOME
/usr/java/jdk1.7.0_17
$
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/usr/java/jdk1.7.0_17/bin
$
尝试运行 java 程序时出现以下错误!
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
我需要升级64-bit OS
并安装64-bit JVM
吗?或者我应该用更多升级我的硬件RAM
?