简体   繁体   English

Eclipse只是无法启动

[英]Eclipse just does not start up

I recently uninstalled and then reinstalled Java on my machine and ever since, Eclipse just does not start up. 最近,我在机器上卸载了Java,然后重新安装了Java,从那时起,Eclipse就无法启动。 I find this weird, because I uninstalled a different version of Java from the one that I use. 我觉得这很奇怪,因为我卸载了与使用的Java不同的Java版本。 I modified the eclipse.ini file, by adding the following: 我通过添加以下内容修改了eclipse.ini文件:

-vm

C:\\Program Files (x86)\\Java\\jre1.5.0_15\\bin\\javaw.exe

This made no difference. 这没什么区别。 I then tried to reset the JAVA_HOME variable and I tried both these things again, after reinstalling (well, unzipping) Eclipse again. 然后,我尝试重置JAVA_HOME变量,并在重新安装(很好,解压缩)Eclipse之后再次尝试了这两种方法。 None of this made any difference, which is why I'm posting this question. 这些都没有任何区别,这就是为什么我发布此问题。 Can someone help me out here? 有人可以帮我吗?

You need to make sure that the path to javaw.exe is in %PATH% environment variable. 您需要确保javaw.exe的路径在%PATH%环境变量中。 Basically: 基本上:

%PATH% = %PATH%;c:\path\to\jre\bin

You can configure this in the environment variables configuration and you can verify this by opening a command prompt and test if java is recognized as a command from inside an arbitrary path. 您可以在环境变量配置中对此进行配置,并且可以通过打开命令提示符来进行验证,并测试是否从任意路径内部将java识别为命令。

The %JAVA_HOME% should by the way point to the JDK's /bin folder, not the one of the JRE. 顺便说一下, %JAVA_HOME%应该指向JDK的/bin文件夹,而不是JRE之一。 Regardless, this environment variable is ignored by Eclipse since it comes with its own compiler. 无论如何,Eclipse都会忽略此环境变量,因为它带有自己的编译器。

I uninstalled all the versions of Java I had installed and installed them again. 我卸载了已安装的所有Java版本,然后再次安装它们。 I also deleted Eclipse and downloaded that again. 我还删除了Eclipse并再次下载了它。 Following this, I edited the eclipse.ini file to include the path the javaw.exe, as I mentioned in the question. 之后,我编辑了eclipse.ini文件,以包含javaw.exe的路径,正如我在问题中提到的那样。 Everything works fine now. 现在一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM