我尝试使用“update-java-alternatives”命令从 Java 5 切换到 Java 6,如本页所述:https ://help.ubuntu.com/community/Java
但是后来当我尝试执行java时出现以下错误:
root@webserver:~# 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 的(谷歌翻译的)英文文本:
root@server:~# 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)
我希望这可以帮助你帮助我。