简体   繁体   English

缺少Eclipse JRE或JDK

[英]Eclipse JRE or JDK missing

I am trying to use Eclipse on a friends computer but we keep getting this when we run Eclipse 我正在尝试在朋友计算机上使用Eclipse,但是在运行Eclipse时我们一直在使用它

在此处输入图片说明

We have the environmental variable set as well. 我们也设置了环境变量。

在此处输入图片说明


Edit 编辑

it was working before he installed the black berry plug in. 在他安装黑莓插件之前,它一直在工作。

The variable JAVA_HOME is not required by Eclipse. Eclipse不需要变量JAVA_HOME If your Java installation does not put the Java executables in the PATH , you should add those manually. 如果您的Java安装未将Java可执行文件放入PATH ,则应手动添加它们。

A faster way to have your Eclipse up and running consists in modifying the eclipse.ini and using the -vm option. 启动和运行Eclipse的更快方法是修改eclipse.ini并使用-vm选项。

http://wiki.eclipse.org/Eclipse.ini#-vm_value:_Windows_Example http://wiki.eclipse.org/Eclipse.ini#-vm_value:_Windows_Example

I had the same problem. 我有同样的问题。 For me, I needed the JDK . 对我来说,我需要JDK So I had to install the JDK. 因此,我必须安装JDK。 It should match the build platform that is, 64bit vs. 32bit windows. 它应与64位和32位窗口的构建平台匹配。 After that, I removed, the -vm line from the eclipse.ini file (the suggested fix). 之后,我从eclipse.ini文件中删除了-vm行(建议的修复程序)。 It was giving me the "Can't create virtual machine" error. 它给了我“无法创建虚拟机”错误。 The current release of JDK is version, 7 whereas the Android Developers Toolkit version of eclipse is currently based on JDK 6. But it seems to work. JDK的当前版本为版本7,而Eclipse的Android开发者工具包版本当前基于JDK6。但是它似乎可以正常工作。 Eclipse came up and is functional. Eclipse出现并且可以运行。 Haven't actually written a program yet. 尚未实际编写程序。

Go to eclipse folder (where eclipse is installed) and open eclipse.ini file in your editor and add the following code after openFile tag. 转到eclipse文件夹(安装eclipse的位置),然后在编辑器中打开eclipse.ini文件,并在openFile标记后添加以下代码。

-vm C:\\Program Files\\JDK6\\bin\\javaw.exe -vm C:\\ Program Files \\ JDK6 \\ bin \\ javaw.exe

That's all. 就这样。

I had a similar problem, since our Java and JDK is consistently updated by our service desk, including uninstalling old JDKs. 我遇到了类似的问题,因为我们的服务台不断更新Java和JDK,包括卸载旧的JDK。 They take care of the PATH for us, but then the JRE that Eclipse was used to "seeing" was gone. 他们为我们处理了PATH,但是后来Eclipse用来“查看”的JRE消失了。 So, the thing that has worked best for me is to modify the shortcut's "target" from: 因此,最适合我的是从以下位置修改快捷方式的“目标”:

"C:\Program Files\Eclipse\Eclipse IDE for Java EE Developers\eclipse.exe"

to

"C:\Program Files\Eclipse\Eclipse IDE for Java EE Developers\eclipse.exe" -vm "C:\Program Files\Java\<jdkver>\jre\bin\javaw.exe"

That will point Eclipse toward to the JRE in the JDK you want it to use, and then you can update that shortcut when your JDK updates. 这会将Eclipse指向您要使用的JDK中的JRE,然后可以在更新JDK时更新该快捷方式。

This is on Windows 64bit, obviously. 显然,这是在Windows 64位上。

It can also happen on mismatch of JAVA and Eclipse bit version . 如果JAVA和Eclipse位版本 不匹配 ,也会发生这种情况。

for eg: 例如:

If in your System java is 32 bit and you are trying to install Eclipse of 64 bit then the same situation might occur. 如果您的系统中的Java是32位,并且您试图安装64位的Eclipse,则可能会发生相同的情况。 Because Eclipse will look Java in Program Files while at the same time Java may be present in Program Files (x86). 因为Eclipse将在程序文件中查找Java,而Java可能同时出现在程序文件(x86)中。

So in this case eclipse will not get java and throw the same error. 因此,在这种情况下,eclipse不会获取Java并抛出相同的错误。

While installing eclipse, Jre missing : 在安装eclipse时,Jre丢失了:

I solved my error as follows:- 我解决了我的错误,如下所示:

This error may comes if you have 2 program files folder in your system. 如果您的系统中有2个program files文件夹,则可能会出现此错误。 "Program files" & "Program files x86". “程序文件”和“程序文件x86”。

Please install JDK&JRE in the "Program files" folder. 请在“程序文件”文件夹中安装JDK&JRE。 Hope your jre missing error get solved. 希望您的jre缺少错误得到解决。

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

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