Cause: Due to project reasons, the original project should be migrated from jdk1.6 to jdk1.7
Problem: The default JDK environment for Eclipse is jdk1.6
Workaround:
1) The first is to install the jdk1.7, and configure the environment variables, here will not say
2) Modifying the JDK environment of Eclipse
1. Menu Bar Window-->preference
Select Installed JREs under Java, I have to import the required JDK package, if there is no required version of Eclipse, click the Add button to install the jdk1.7 install directory import, after import, check in front of jdk1.7.
Then select the compiler option under Java, select 1.7
Finally click OK.
2. Right click on the existing Java project and click the Properties option
First select the project facets option, change the Java version of Jiang to 1.7
Then select Java build path as shown in the figure
Then select the Java compiler option and follow the figure
Modifying the Eclipse JDK environment