目标不是 JDK 根。未找到系统库。Eclipse Oxygen 4.7 + Java9 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41029647/
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
Target is not a JDK root. System library was not found. Eclipse Oxygen 4.7 + Java9 error
提问by null
I'm trying to test JDK9 (jdk-9-ea+147 version) with Eclipse Oxygen IDE.
我正在尝试使用 Eclipse Oxygen IDE 测试 JDK9(jdk-9-ea+147 版本)。
I've installed jdk along with jre. From Eclipse Market Place I've installed Java9 Beta extension:
我已经安装了 jdk 和 jre。从 Eclipse Market Place 我安装了 Java9 Beta 扩展:
The problem is, when I'm trying to add new installed jre from Eclipse I get following error:
问题是,当我尝试从 Eclipse 添加新安装的 jre 时,出现以下错误:
Interesting thing is that this error doesn't occur with installations of previous JDK versions:
有趣的是,安装以前的 JDK 版本不会发生此错误:
Does anyone encounter simillar problem with Eclipse Oxygen? Any feedback is appreciated.
有没有人遇到过与 Eclipse Oxygen 类似的问题?任何反馈表示赞赏。
回答by greg-449
回答by skomisa
I've just successfully tested JDK9 with Eclipse Oxygen IDE following the approach you detailed.
我刚刚按照您详细介绍的方法使用 Eclipse Oxygen IDE 成功测试了 JDK9。
Here are the details of my installation (under Windows 10):
以下是我的安装详细信息(在 Windows 10 下):
I downloaded and installed Java jdk-9+181 from http://jdk.java.net/9/
I downloaded and installed Eclipse Oxygen from https://www.eclipse.org/downloads/download.php?file=/oomph/epp/oxygen/R/eclipse-inst-win64.exe
I started Eclipse and attempted to add JRE9 (Windows -> Preferences -> Java -> Installed JREs -> Add...)
I got the error reported in the OP ("Target is not a JDK root...").
I then installed Java 9 Support (BETA) for Oxygen as detailed here: https://marketplace.eclipse.org/content/java-9-support-beta-oxygen
I restarted Eclipse and tried to add JRE 9 again. This time it worked fine:
我从http://jdk.java.net/9/下载并安装了 Java jdk-9+181
我从https://www.eclipse.org/downloads/download.php?file=/oomph/epp/oxygen/R/eclipse-inst-win64.exe下载并安装了 Eclipse Oxygen
我启动了 Eclipse 并尝试添加 JRE9(Windows -> Preferences -> Java -> Installed JREs -> Add...)
我收到了 OP 中报告的错误(“目标不是 JDK 根目录...”)。
然后我为 Oxygen 安装了 Java 9 Support (BETA),详细说明如下:https: //marketplace.eclipse.org/content/java-9-support-beta-oxygen
我重新启动了 Eclipse 并尝试再次添加 JRE 9。这次效果很好:
- Also, see https://wiki.eclipse.org/Java9/Examplesfor further details.
- 此外,请参阅https://wiki.eclipse.org/Java9/Examples了解更多详细信息。
回答by Saheb
Oxygen does not come with java9 support. You need to install the eclipse Java9 support patch from the market place https://marketplace.eclipse.org/content/java-9-support-beta-oxygento be able to use Java9 or you can update from "Help" menu bar.
Oxygen 不支持 java9。您需要从市场https://marketplace.eclipse.org/content/java-9-support-beta-oxygen安装 eclipse Java9 支持补丁才能使用 Java9,或者您可以从“帮助”菜单栏更新.
回答by rabi
set the path to:: /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
将路径设置为::/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home