简体   繁体   中英

Eclipse JRE or JDK missing

I am trying to use Eclipse on a friends computer but we keep getting this when we run 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. If your Java installation does not put the Java executables in the PATH , you should add those manually.

A faster way to have your Eclipse up and running consists in modifying the eclipse.ini and using the -vm option.

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

I had the same problem. For me, I needed the JDK . So I had to install the JDK. It should match the build platform that is, 64bit vs. 32bit windows. After that, I removed, the -vm line from the eclipse.ini file (the suggested fix). 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. Eclipse came up and is functional. 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.

-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. They take care of the PATH for us, but then the JRE that Eclipse was used to "seeing" was gone. 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.

This is on Windows 64bit, obviously.

It can also happen on mismatch of JAVA and Eclipse bit version .

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. Because Eclipse will look Java in Program Files while at the same time Java may be present in Program Files (x86).

So in this case eclipse will not get java and throw the same error.

While installing eclipse, Jre missing :

I solved my error as follows:-

This error may comes if you have 2 program files folder in your system. "Program files" & "Program files x86".

Please install JDK&JRE in the "Program files" folder. Hope your jre missing error get solved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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