在Eclipse中设置JDK [英] Setting JDK in Eclipse
问题描述
我想使用这两个构建我的项目。最初我们只建立了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屋!