Java 无法找到 jre1.8.0_77 的可执行文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36757838/
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-11 18:38:59  来源:igfitidea点击:

Unable to locate executable for jre1.8.0_77

javaeclipse

提问by Imani M. Hymanson

Says on my eclipse "Unable to locate executable for jre1.8.0_77". It also deleted the JREs :( I tried to run my project and went into Windows and preferences to add it but I couldn't.

在我的日食上说“无法找到 jre1.8.0_77 的可执行文件”。它还删除了 JRE :( 我尝试运行我的项目并进入 Windows 和首选项添加它,但我不能。

回答by Ravindu Shashika Ilangamge

  • Go to Windows > Preferences.
  • Locate Java > Installed JREs. (Or simply type JREs in the search box).
  • The screen will show the list of JREs.
  • Click on Add button, locate the new folder on your machine and select.
  • Remove the old JRE from the list.
  • 转到 Windows > 首选项。
  • 找到 Java > 已安装的 JRE。(或者只需在搜索框中键入 JRE)。
  • 屏幕将显示 JRE 列表。
  • 单击添加按钮,在您的机器上找到新文件夹并选择。
  • 从列表中删除旧的 JRE。

Same Question has asked before and here's the Link - How to change default JRE for all Eclipse workspaces?

之前已经问过同样的问题,这里是链接 -如何更改所有 Eclipse 工作区的默认 JRE?

回答by shu

Maybe you updated Java version but your PC's environment variable for JRE is still referring to the old version of JRE. If you updated Java, update your environment variable also.

也许您更新了 Java 版本,但您 PC 的 JRE 环境变量仍然指的是旧版本的 JRE。如果您更新了 Java,请同时更新您的环境变量。

回答by Abhishek D K

recently i encountered same issue,
this happened after i updated my jre
because of this there was mismatch with jdkand jreversions

最近我遇到了同样的问题,
这是在我更新jre之后发生的,
因为jdkjre版本 不匹配

uninstalled java and installed newer JDK(SE) kit. https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
now both jdk and jre are same

卸载了 java 并安装了较新的JDK( SE) 工具包。https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
现在 jdk 和 jre 相同