简体   繁体   中英

Eclipse cannot find javaw.exe

When i start eclipse i get this problem:

在此输入图像描述

The location of javaw.exe in my computer is C:\\Program Files\\Java\\jre7\\bin. I have tried change the path environment variable then i get different error like:

在此输入图像描述

Following the comment of @nitind, I've checked the bit depth of my Eclipse and of the installed Java. It turned out that, apparently, during the recent update the Java installer has deleted the old 64 bit installation (so program files/java/jre7/ became empty. After downloading the 64 bit version manually (from http://www.java.com/en/download/manual.jsp ), I'm now able to run Eclipse again.

Also got this Eclipse open refusal bug now after the JRE was updated to jre1.8.0_111.

For some reason it was trying to find a jre1.8.0_101/bin/javaw.exe instead of the jre1.8.0_111/bin/javaw.exe file . . .

Solution was to go to the eclipse Configuration Settings file and then change

-vm
C:/Program Files/Java/jre1.8.0_101/bin/javaw.exe

to

-vm
C:/Program Files/Java/jre1.8.0_111/bin/javaw.exe

Why was the virtual machine pointed at a file called

jre1.8.0_101/bin/javaw.exe

in the first place ?

Search me but I don't know !

Try starting your eclipse.ini (in the same directory with eclipse.exe) with the two lines:

-vm
C:/Program Files/Java/jre7/bin/javaw.exe

JAVA_HOME should be left as it was before, eg c:\\Program Files\\Java\\jdk1.7.0 , and %JAVA_HOME%\\bin should be added to the PATH variable, so all required files are available in the environment.

That should be all you need to run Eclipse. If you'd like to specify a diferent vm, take a look at http://wiki.eclipse.org/Eclipse.ini

If you updated your JRE as did I, eclipse will send the same error report. To correct this issue I went into the eclipse path (ie) path\\eclipse\\jee-mars\\eclipse and updated the "eclipse configuration-setting" file.

Open the file in some form of editior, I used notepad++. Update the version of JRE on this line..."C:\\Program Files\\Java\\jre1.8.0_91\\bin" save the file and start eclipse.

i was faced this issue because my JAVA_HOME is not there in the system environment, path variable don't have the java related info.

so go to the elipse folder and edited the "eclipse.ini" file with below lines after "openFile" line

-vm C:\\Program Files\\Java\\jdk1.8.0_144\\bin\\javaw.exe

it solves my issue.

Since it has told you that it was looking in D:\\Eclipse\\jre\\bin\\ for javaw.exe go to C: <- your computer look in program files or else where for java. java will contain a file that has a jre\\bin\\ and you will find javaw.exe copy the contents of bin to D:\\Eclipse\\jre\\bin\\ and you are set.

alternatively copy the the jre file inside the java folder and replace the jre file in the Eclipse folder and you are set.

Now the above (first) solution works but is bad practice.

Good practice is to have your jre folder set in your path variables.

所以对于像我这样的任何完整的noob将java开发工具包(JDK)移动到eclipse文件夹并将其重命名为jre

JAVA_HOME should be added like c:\\Program Files\\Java\\jdk1.7.0 , and %JAVA_HOME%\\bin should be added to the PATH variable. Then it works without issues.

Please map correctly java path in environment varibales like below. it will be resolved. Path=C:\\Program Files\\Java\\jdk1.6.0_16\\bin;

For sure it will be resolved

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