简体   繁体   English

如何在Eclipse项目中更改JRE版本?

[英]How can I change JRE version in Eclipse project?

Hello I have an project in Eclipse and I need change my JRE version in this progect to JRE 1.7 from JRE 1.8. 您好,我在Eclipse中有一个项目,我需要将此程序中的JRE版本从JRE 1.8更改为JRE 1.7。 How can I do it? 我该怎么做?

In the Preferences go to 'Java > Installed JREs' and add the Java 8 JRE/JDK if it is not already there. 在“首选项”中,转到“ Java>已安装的JRE”并添加Java 8 JRE / JDK(如果尚不存在)。

In the Properties for the project look at 'Java Build Path'. 在项目的属性中,查看“ Java构建路径”。 On the 'Libraries' tab edit the JRE entry and select Java 8. 在“库”选项卡上,编辑JRE条目,然后选择Java 8。

You may also want to set the Java Compiler preferences for the project (or the global preferences) to specify Java 8 compliance. 您可能还需要设置项目的Java编译器首选项(或全局首选项),以指定Java 8兼容性。

Note: You need to be running Eclipse Luna (4.4) or later for full Java 8 support. 注意:您需要运行Eclipse Luna(4.4)或更高版本才能完全支持Java 8。

Windows>首选项> Java>已安装的JRE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM