安装eclipse官网地址:http://www.eclipse.org/downloads/index.php
安装后,打开报错:
java was started but returned exit code = 31
网上查了说有可能是以下原因:
. 需要在eclipse.ini中加入JVM的路径说明。语法很简单:
-vmC:\Program Files\Java\jdk1.6.0_22\bin\javaw.exe
eclipse.ini说明文档中特别提到使用-vm参数的注意事项:
(1)The -vm option and its value (the path) must be on separate lines.(-vm选项和其对应的javaw.exe的路径必须各占一行,这应该是参数解析的格式要求)
(2)The value must be the full absolute path to the Java executable, not just to the Java home directory.(指定的虚拟机路径必须是指向可执行Java程序的完整绝对路径,不能只指定到Java_HOME目录。这个好理解,要指定JVM的话肯定要指定到具体的可执行文件去)
(3)The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.(-vm选项必须放在-vmargs选项前,这是因为-vmargs选项后的值都是作为JVM的参数传给虚拟机的,如果-vm放在-vmargs之后就没有意义了。而-vmargs选项中一般可指定-Xms和-Xmx这两个内存参数)
于是改了-Xms和-Xmx这两个内存参数的值为64,并加了-vm为java路径
然而并没有什么卵用。。。。
转而报了下面的错误:
Error:Could not create the Java Virtual Machine Error:A fatal exception has occurred
解决方案竟然是本地java安装不对,系统是64的,安装了32的java,重新安装、修改环境变更。搞掂~~
java下载地址:http://rj.baidu.com/search/index/?kw=java


被折叠的 条评论
为什么被折叠?



