Eclipse - 没有 Java (JRE)/(JDK) ...没有虚拟机 [英] Eclipse - no Java (JRE) / (JDK) ... no virtual machine
问题描述
我正在尝试让 Eclipse v3.5 (Galileo) 在我的计算机上重新运行 - 我之前运行它没有任何问题,但是 现在我不断收到此错误:><块引用>
Java 运行时环境 (JRE) 或 Java 开发工具包 (JDK) 必须可用才能运行 Eclipse.搜索以下位置后未找到 Java 虚拟机:C:eclipsejrejavaw.exejavaw.exe 在您当前的路径中
我刚刚重新安装了 JDK 和 SDK.
我有 Windows 7 (x64).
这是怎么回事?我该如何解决?
我无法运行任何 ipconfig/tracert/或 ping.
Eclipse 将默认尝试使用默认的java.exe
"(您的 PATH 引用的第一个
)
要记住的三件事:
- 安装" 评论:<块引用>
我运行的是 64 位 Windows 7,并且安装了 32 位 JRE.我下载了寻找 64 位 JRE 的 Eclipse 64 位.因为我没有 64 位 JRE,所以它抛出了错误,这是有道理的.
我访问了 Java 手册安装页面(它不像您希望的那样直接访问)并安装了 64 位版本.请参阅适用于所有操作系统的 Java 下载".这就是我所需要的.
<小时>
2016 年 4 月:Steve Mayne 添加了 在评论中:
<块引用>我必须编辑
eclipse.ini
文件以引用正确的 Java 路径 -当eclipse.ini
中有值时,Eclipse 根本不使用环境PATH
.I am trying to get Eclipse v3.5 (Galileo) to re-run on my computer - I have run it before with no problems, but now I keep getting this error:
A Java Runtime Environment (JRE) or Java Development kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: C:eclipsejrejavaw.exe javaw.exe in your current PATH
I've just done a fresh install of both the JDK and the SDK.
I have Windows 7 (x64).
What's up with this? How do I fix it?
I can't run any of the ipconfig / tracert / or ping.
解决方案Eclipse will by default try to launch with the default "
java.exe
" (the first one referenced by yourPATH
)Three things to remember:
- "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.
June 2012, jmbertucci comments:
I'm running Windows 7 64-bit and I had the 32-bit JRE installed. I downloaded Eclipse 64-bit which looks for a 64-bit JRE. Because I didn't have the 64-bit JRE it threw the error, which makes sense.
I went to the Java manual install page (which was not as directly accessible as you'd like) and installed the 64-bit version. See "Java Downloads for All Operating Systems". That was all I needed.
April 2016: Steve Mayne adds in the comments:
I had to edit the
eclipse.ini
file to reference the correct Java path - Eclipse doesn't use the environmentPATH
at all when there is a value ineclipse.ini
.这篇关于Eclipse - 没有 Java (JRE)/(JDK) ...没有虚拟机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!