如何在 Eclipse 中更新 JRE
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30388110/
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
How to update the JRE in Eclipse
提问by Antonio Aguilar
So, I ran my Projects in Eclipse
with a Run Configuration that used the JRE 1.8_40
, but I update it to 1.8_45
and Eclipse
says this:
因此,我Eclipse
使用使用 的运行配置运行我的项目JRE 1.8_40
,但我将其更新为1.8_45
并Eclipse
说:
Unable to locate executable for jre1.8.0_40
无法找到 jre1.8.0_40 的可执行文件
Because when I installed the _45
version Java told me If I wanted to clean the system by deleting the old Java Versions, thinking that Eclipse was smart and knew that I update it, but no, now I get that annoying Error.
因为当我安装_45
Java 版本时告诉我如果我想通过删除旧的 Java 版本来清理系统,认为 Eclipse 很聪明并且知道我更新了它,但是没有,现在我得到了那个烦人的错误。
回答by Pramod Karandikar
- Go to
Windows > Preferences
. - Locate
Java > Installed JREs
. (Or simply typeJREs
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 > Preferences
。 - 定位
Java > Installed JREs
。(或只需JREs
在搜索框中键入)。 - 屏幕将显示 JRE 列表。
- 单击
Add
按钮,在您的机器上找到新文件夹并选择。 - 从列表中删除旧的 JRE。
回答by Ankur Singhal
Window-->Preferences-->Java-->Installed JREs-->Add... - Right click on your project-->Build Path-->Configure Build Path-->Add library-->JRE system library-->next-->WorkSpace Default JRE
Window-->Preferences-->Java-->Installed JREs-->Add... - 在你的项目上右键-->Build Path-->Configure Build Path-->Add library-->JRE system library- ->next-->WorkSpace 默认 JRE