我正在尝试让Eclipse v3.5 (Galileo)在我的计算机上重新运行-我以前运行过,没有问题,但现在我一直得到这个错误:

要运行Eclipse,必须提供Java运行时环境(JRE)或Java开发工具包(JDK)。在搜索以下位置后没有发现Java虚拟机: C: \ eclipse \ jre \ javaw.exe javaw.exe在当前路径

我刚刚重新安装了JDK和SDK。

我用的是Windows 7 (x64)。

这是怎么回事?我该怎么解决呢?

我不能运行任何ipconfig / tracert /或ping。


当前回答

别担心,我也被这个错误和致命的破坏,当我得到它,我是如此沮丧,甚至我是给离开一个android编程,但我得到了它,简单地首先复制这段代码,并粘贴在你的系统变量下路径…

C:\程序文件;C:\Winnt;C:\Winnt\System32;C:\程序 Files\Java\jre6\bin\javaw.exe

现在从你的路径复制“jre”文件夹,就像我在这个路径下有“jre”一样

            C:\Program Files\Java

并将其粘贴到eclipse文件夹中意味着放置eclipse.exe文件的位置。比如我在这个位置设置了日食

    F:\Softwares\LANGUAGES SOFTEARE\Android Setup\eclipse

所以在eclipse文件夹中粘贴jre文件夹。如果您有“jre6”,则将其重命名为“jre”....运行你的eclipse,你会得到解决方案…

   //<<<<<<<<<<<<<<----------------------------->>>>>>>>>>>>>>>>>>>                 

其他方案:2

如果上述步骤无法解决问题,请执行以下步骤

从您的Java路径(如C:\Program Files\Java\jre6*)复制文件夹“jre” 等,并将其粘贴到您的eclipse目录(Where is your eclipse 可用) 打开eclipse。ini文件。 像这样更改javaw.exe文件的目录

-vmF:\Softwares\LANGUAGES SOFTEARE\Android Setup\eclipse Indigo version 32 Bit\jre\bin/java .exe

现在,当你启动eclipse时,它将搜索javaw.exe,所以它将搜索eclipse.ini中的路径,因为它现在在同一个文件夹中,它将启动javaw.exe,它将开始工作。

如果你还有任何疑问,你可以再问一次,只要上我的个人资料,找到我的电子邮件id。因为我喜欢堆栈溢出论坛,它让我成为了一名程序员

其他回答

只需要复制这个文件:

c:/Program Files/Java/jre(5,6,7..any version)/bin/javaw.exe

到Eclipse文件夹

*注仅测试Windows

从控制面板打开Windows的系统属性,找到环境变量部分:

添加一个JAVA_HOME条目,指向JDK安装的目录(例如C:\Program Files\Java\ jre6) 找到Path条目并将以下内容添加到末尾;%JAVA_HOME%\bin 好的,这些变化 重新启动eclipse,使其知道新环境

大多数Java工具现在都能够通过使用JAVA_HOME环境变量或在Path环境变量中查找Java .exe / javaw.exe来找到您的Java安装。

尝试将JAVA_HOME设置为正确的文件夹。谷歌用于设置Windows环境变量。

结果证明,我所需要做的就是将“路径”更改为:

“C: \ Windows \ system32系统;C: \ Windows; C: \ Windows \ system32系统\ Wbem; C:\Program Files (x86)\ Java; C:\Program Files (x86) \ Java \ jdk1.6.0_14 \ bin”

这样就成功了:)

Eclipse将在默认情况下尝试使用默认的“java.exe”(由PATH引用的第一个)启动。

要记住三件事:

"Installing" a JRE or a JDK can be as simple as unzipping or copying it from another computer: there is no special installation steps, and you can have as many different JVM versions (1.4, 5.0, 6.0...) as you want, "installed" (copied) almost anywhere on your disk. I would recommend to always run Eclipse with the lastest JRE possible (to benefit from the latest hotspot evolutions). You can: Reference that exact JRE path in your eclipse.ini. Copy any JRE of your in your <eclipse>/jre directory. In both cases, no PATH to update. The JVM you will reference within your Eclipse session is not always the one used for launching Eclipse because: You only need a JRE to launch Eclipse, but once Eclipse launched, you should register a JDK for your projects (especially for Java sources and debugging purposes, also in theory for compilation but Eclipse has its own Java compiler) Note: You could register just a JRE within Eclipse because it is enough to run your program, but again a JDK will allow for more operations. Even though the default registered Java in Eclipse is the one used to launch the session, you can want to register an older SDK (including a non-Sun one) in order to run/debug your programs with a JRE similar to the one which will actually be used in production.


2012年6月,jmbertucci评论道:

我运行的是64位的Windows 7,并且安装了32位的JRE。 我下载了一个64位的Eclipse 64位JRE。 因为我没有64位JRE,所以它抛出了错误,这是有道理的。 我转到Java手动安装页面(不像你想的那样直接访问),安装了64位版本。参见“适用于所有操作系统的Java下载”。 这就是我所需要的。


2016年4月:史蒂夫·梅恩在评论中补充道:

我必须编辑eclipse.ini文件以引用正确的Java路径- 当Eclipse .ini中有值时,Eclipse根本不使用环境PATH。