Eclipse 找不到 javaw.exe

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19453509/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 17:19:45  来源:igfitidea点击:

Eclipse cannot find javaw.exe

javaeclipsejvm

提问by Mikesh

When i start eclipse i get this problem:

当我开始 eclipse 时,我遇到了这个问题:

enter image description here

在此处输入图片说明

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:

javaw.exe 在我的电脑中的位置是 C:\Program Files\Java\jre7\bin。我尝试更改路径环境变量,然后出现不同的错误,例如:

enter image description here

在此处输入图片说明

采纳答案by Trunk

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

在 JRE 更新到 jre1.8.0_111 之后,现在也得到了这个 Eclipse 打开拒绝错误。

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 . . .

出于某种原因,它试图找到一个 jre1.8.0_101/bin/javaw.exe 而不是 jre1.8.0_111/bin/javaw.exe 文件。. .

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

解决办法是去eclipse配置设置文件然后改

-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 !

搜索我,但我不知道!

回答by Ed Staub

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

尝试使用以下两行启动 eclipse.ini(与 eclipse.exe 位于同一目录中):

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

回答by Morfic

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

JAVA_HOME 应该保持原样,例如c:\Program Files\Java\jdk1.7.0%JAVA_HOME%\bin应该添加到 PATH 变量中,以便环境中可以使用所有必需的文件。

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

这应该是您运行 Eclipse 所需的全部内容。如果您想指定不同的虚拟机,请查看http://wiki.eclipse.org/Eclipse.ini

回答by texnic

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.

按照@nitind 的评论,我检查了 Eclipse 和已安装 Java 的位深度。事实证明,显然,在最近的更新中,Java 安装程序删除了旧的 64 位安装(因此程序文件/java/jre7/ 变为空。手动下载 64 位版本后(从http://www.java. com/en/download/manual.jsp),我现在可以再次运行 Eclipse。

回答by Rajitha

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

请在如下环境变量中正确映射 java 路径。它将得到解决。路径=C:\Program Files\Java\jdk1.6.0_16\bin;

For sure it will be resolved

肯定会解决的

回答by JayLav

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 (i.e) path\eclipse\jee-mars\eclipse and updated the "eclipse configuration-setting" file.

如果您像我一样更新了 JRE,eclipse 将发送相同的错误报告。为了纠正这个问题,我进入了 eclipse 路径(即 path\eclipse\jee-mars\eclipse 并更新了“eclipse configuration-setting”文件。

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.

以某种编辑器形式打开文件,我使用的是记事本++。在这一行更新JRE的版本...“C:\Program Files\Java\jre1.8.0_91\bin”保存文件并启动eclipse。

回答by Venkata Naresh Babu

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.

我遇到这个问题是因为我的 JAVA_HOME 在系统环境中不存在,路径变量没有 java 相关信息。

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

所以转到 elipse 文件夹并在“openFile”行之后用以下几行编辑“eclipse.ini”文件

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

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

it solves my issue.

它解决了我的问题。

回答by TimeTrax

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.

既然它告诉你它在 D:\Eclipse\jre\bin\ 中查找 javaw.exe,请转到 C: <- 您的计算机查找程序文件或其他地方查找 java。java 将包含一个具有 jre\bin\ 的文件,您会发现 javaw.exe 将 bin 的内容复制到 D:\Eclipse\jre\bin\ 并设置。

或者复制java文件夹中的jre文件,替换Eclipse文件夹中的jre文件即可。

现在上述(第一个)解决方案有效,但这是不好的做法。

好的做法是在路径变量中设置 jre 文件夹。

回答by user10692919

so for any complete noobs like me move the java dev kit (JDK) to the eclipse folder and rename it jre

所以对于像我这样的完全菜鸟,将 java dev kit (JDK) 移动到 eclipse 文件夹并将其重命名为 jre

回答by Shafeeque Kinarullakandy

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

JAVA_HOME应该像c:\Program Files\Java\jdk1.7.0 一样%JAVA_HOME%\bin添加,并且应该添加到 PATH 变量中。然后它可以正常工作。