我尝试使用本页面上所述的“update-java-alternatives”命令从Java 5切换到Java 6:https://help.ubuntu.com/community/Java如何在尝试使用update-java-alternatives切换到Java 6后在Ubuntu中修复Java
但事后我收到以下错误,当我试图执行java:
[email protected]:~# java
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
我也尝试过使用“apt-get的”重新设置Java二进制文件,但我没有成功重新安装它。我想发布“apt-get”错误,但不幸的是,我不知道如何打印出英文而不是德文的错误信息。
我的系统是Ubuntu 8.04 ROOT服务器。
这里是(谷歌翻译)英文文本特林重新安装Java 6:
[email protected]:~# apt-get install sun-java6-jdk
Reading package lists ... Ready
Dependency tree
Reading state information ... Ready
sun-java6-jdk is already the newest version.
sun-java6-jdk set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 86 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Set up a sun-java6-bin (6-03-0ubuntu2) ...
Could not create the Java virtual machine.
dpkg: error processing sun-java6-bin (- configure):
Subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
sun-java6-bin
E: Sub-process/usr/bin/dpkg returned an error code (1)
我希望这可以帮助你帮助我。
必须有更好的解决方案,但根据[这个答案](http://serverfault.com/questions/95968/cant-start-java-error-could-not-reserve-enough-space-for-object - 你需要重新启动:/ – 2010-06-04 21:00:18
呃...我可以理解你是否仍然使用8.10 LTS,但8.04不是长期的支持版本... – Powerlord 2010-06-04 21:03:18