How to change the JDK version under Eclipse

Source: Internet
Author: User

Eclipse is the most common software development tool for Java developers, and Eclipse is based on the JDK. Of course, in order to accommodate the needs of the project, sometimes we need to change the JDK version. This article is based on my actual experience, to introduce you, eclipse how to replace the JDK version. This paper takes JDK1.8 replacement as JDK1.6 as an example to illustrate. Method/Step

To view the project, the previously used JDK was 1.8.

Select the item, click "Build Path", then "Configure build Path" to enter the following interface.

To delete JDK1.8, click "Add Library", "JRE System Library", click "Next" button, select jdk1.6, click "Finish" button.


At this point you can see that the JDK has changed from 1.8 to 1.6 and click on the "OK" button. At this point, the execution program will report the following error.

Select the item and right-click on "Properties" to enter the Project property interface.

Click "Java Compiler", select "Compiler compliance Level", change to 1.6, click "OK" button. At this point, the execution of the program can be performed normally.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.