Eclipse:对Java 1.7的沮丧(未绑定的库) [英] Eclipse: Frustration with Java 1.7 (unbound library)

查看:130
本文介绍了Eclipse:对Java 1.7的沮丧(未绑定的库)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在全新的Eclipse安装中,我遇到了一个全新的项目。复制步骤:


  1. 下载此版本的Eclipse: http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/heliosr


  2. 解压到 c:\program files\eclipse java


  3. 启动Eclipse选择一个工作区


  4. 文件> 新建> Java项目 p>


  5. 项目名称: Hello World 。 JRE:使用执行环境JRE:JavaSE-1.7


  6. 点击下一步,转到库选项卡。唯一的条目是 JRE系统库[JavaSE-1.7](未绑定)。 无限制是什么意思?如何解决?


  7. 点击完成


预期:全新的项目工作正常。



实际:有两个错误:

 项目无法构建,直到构建路径错误被解决HelloWord未知Java问题
未绑定的类路径容器:项目中的JRE系统库[JavaSE-1.7] 'HelloWord'HelloWord构建路径构建路径问题

我在这里做错什么?



更新:也许我的机器上并没有Java 7 JDK。如何确定?



更新2:看起来Java 7实际上还没有出来。甜。

解决方案

1)找出驱动器上安装了java的位置,打开cmd提示符,转到该位置并运行。 \java -version来找出确切的版本。或者,很简单,检查控制面板中的添加/删除模块。



2)实际安装jdk 7后,需要告诉Eclipse。窗口 - >首选项 - > Java - >已安装的JRE。


I'm having trouble with a brand new project in a brand new installation of Eclipse. Repro steps:

  1. Download this version of Eclipse: http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/heliosr

  2. Unzip to c:\program files\eclipse java

  3. Launch Eclipse; choose a workspace

  4. File > New > Java Project

  5. Project name: Hello World. JRE: "Use an execution environment JRE: JavaSE-1.7"

  6. Hit Next, go to the Libraries tab. The only entry is JRE System Library [JavaSE-1.7] (unbound). What does "unbound" mean? How do I fix it?

  7. Hit Finish.

Expected: Brand new project works fine.

Actual: There are two errors:

The project cannot be built until build path errors are resolved HelloWord  Unknown Java Problem
Unbound classpath container: 'JRE System Library [JavaSE-1.7]' in project 'HelloWord' HelloWord  Build path Build Path Problem

What am I doing wrong here?

Update: Perhaps I don't actually have the Java 7 JDK on my machine. How can I be sure?

Update 2: Looks like Java 7 is in fact not out yet. Sweet.

解决方案

1) Find out where java is installed on your drive, open a cmd prompt, go to that location and run ".\java -version" to find out the exact version. Or, quite simply, check the add/remove module in the control panel.

2) After you actually install jdk 7, you need to tell Eclipse about it. Window -> Preferences -> Java -> Installed JREs.

这篇关于Eclipse:对Java 1.7的沮丧(未绑定的库)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆