未绑定的类路径容器:Eclipse Juno 中的“JRE 系统库 [OSGi/Minimum-1.2]”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11354865/
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
Unbound classpath container: 'JRE System Library [OSGi/Minimum-1.2]' in Eclipse Juno
提问by nessa
For my class I imported code from an online source given to us by the professor and tried to run it in Eclipse Juno (i'm not sure if it makes a difference what version) And I got the error message "Unbound classpath container: 'JRE System Library [OSGi/Minimum-1.2]' in project 'cs112'" I researched several answers to this problem and tried multiple solutions including building a path and adding a library, which i named JRE, and setting the correct execution environment! What could I possibly be doing wrong? Please help!!
对于我的课程,我从教授提供给我们的在线资源中导入了代码,并尝试在 Eclipse Juno 中运行它(我不确定它是否对什么版本有影响)我收到了错误消息“未绑定的类路径容器:” JRE System Library [OSGi/Minimum-1.2]' in project 'cs112'" 我研究了这个问题的几个答案并尝试了多种解决方案,包括构建路径和添加一个我命名为 JRE 的库,以及设置正确的执行环境!我可能做错了什么?请帮忙!!
回答by Kay
In the Preferences (Menu Window, Preferences), find "Java", "Installed JREs". You should have at least one JRE, better a JDK available. Then, in the same section, there's a sub-section "Execution Environments".
在首选项(菜单窗口,首选项)中,找到“Java”、“已安装的 JRE”。你应该至少有一个 JRE,最好有一个可用的 JDK。然后,在同一部分中,有一个子部分“执行环境”。
The project you're trying to use asks for "OSGi/Minimum-1.2". The "Execution Environments" preference section allows you to view and adjust how the available JREs are mapped to requested execution environments. If none of your JREs are listed as compatible with the requested environment, you may have to
您尝试使用的项目要求“OSGi/Minimum-1.2”。“执行环境”首选项部分允许您查看和调整可用 JRE 如何映射到请求的执行环境。如果您的所有 JRE 均未列为与请求的环境兼容,则您可能必须
- Install a new JRE or JDK, for example a recent Java 1.7
- and, this is important, tell Eclipse about that new JRE by adding it to the "Installed JREs". Select "Add" -> "Standard VM" -> Point to "jdk1.7.xxx".
- 安装新的 JRE 或 JDK,例如最新的 Java 1.7
- 并且,这很重要,通过将新 JRE 添加到“已安装的 JRE”来告诉 Eclipse。选择“添加”->“标准VM”->指向“jdk1.7.xxx”。