Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
257 views
in Technique[技术] by (71.8m points)

java - Target JRE in Eclipse

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...