在Eclipse中定位JRE [英] Target JRE in Eclipse

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

问题描述

我应该如何在Eclipse中更改Target JRE。我之前使用的是jdk1.7,现在我想使用JDK 1.6。但是在运行我的java程序时,我得到了不支持的类版本错误。在使用jdk1.6之前是否需要进行一些设置。我应该如何确保我的eclipse编译并仅在jdk1.6中运行。

How should I change Target JRE in Eclipse. I was earlier using jdk1.7, now I want to use JDK 1.6. But while running my java program I am getting Unsupported Class Version Error. Is there some setting that I need to do before using jdk1.6. How should i make sure that my eclipse compiles and runs only in jdk1.6.

推荐答案

如果项目已经开始JDK 1.6,您还必须更改项目级别设置,因此:

If the project has been already started with JDK 1.6, you have to change also the project level settings, so :

Project ---> Properties ---> Java Compiler : set compliance level and Source compatibility to 1.7

Project ---> Properties ---> Java Build Path ---> Libraries ---> and change the JRE system library to 1.7

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

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