在Eclipse中设置JDK [英] Setting JDK in Eclipse

查看:129
本文介绍了在Eclipse中设置JDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个JDK,用于Java 6和7。



我想使用这两个构建我的项目。最初我们只建立了1.6。
我在我的项目设置中看到,我可以选择1.5,1.6 1.7作为compikler级别。



这些选项如何添加到IDE?我从来没有安装Java 1.5。
假设我想要Java 1.4。我该如何让它出现在列表中?我已经在我的IDE首选项中添加了两个不同的JRE,但这些不是下拉列表中显示的。

解决方案

的可用编译器 - >首选项 - > Java - >已安装的JRE选项卡。



在项目构建路径配置对话框的库选项卡下,可以删除输入JRE System Library,点击添加库,选择安装的JRE进行编译。一些编译器可以配置为在后级编译器版本进行编译。我认为这就是为什么你看到添加版本的选项。


I have two JDKs, for Java 6 and 7.

I want to build my project using both. Initially we only built against 1.6. I see in my project setting I can select 1.5, 1.6 1.7 as the compikler level.

How are these options added to the IDE? I never installed Java 1.5. Suppose I wanted Java 1.4. How would I get this to appear in the list? I have added two different JREs in my IDE preferences, but these are not what appears in the dropdown.

解决方案

You manage the list of available compilers in the Window -> Preferences -> Java -> Installed JRE's tab.

In the project build path configuration dialog, under the libraries tab, you can delete the entry for "JRE System Library", click on "Add Library" and choose the installed JRE to compile with. Some compilers can be configured to compile at a back-level compiler version. I think that's why you're seeing the addition version options.

这篇关于在Eclipse中设置JDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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