Original: 72847110
Requirements background: Sometimes the local eclipse runs a project that uses a higher (low) version of the JDK than the Linux server and requires a low (high) JDK version.
Here's an example where I switched the JDK version from 1.7 to 1.6:
All the settings that need to be set in Eclipse are set in two parts:
Part One: Set the JDK version of the Eclipse workspace, which is the compilation run environment for all projects in eclipse
1.window-preferences-java-compiler-right panel set to 1.6
2.window-preferences-java-installed jres-right Panel "ADD" local 1.6 version of the JDK path, and tick
Go on...
Part Two: Set the JDK version of the project you want to change JDK
3. Right-click Project (typically Cms-core sub-project instead of CMS-CMS project)-properties (or Project right-click-build path-configure Build path)-java build path (right panel)- libraries-(if there is a JRE System Library [JavaSE-1.7] on the right side of the "Edit ..." change to local jdk1.6, if it is a different JDK point "Remove"-add library...-Select "JRE System Library "-next-to local jdk1.6)-then make sure that the tab on the right side of the libraries" Order and Export "also appears in the JRE System library [JavaSE-1.6]
4. The Java compiler-Right panel on the same page as the Java Build path is set to 1.6
5. On the right panel of project facets-with Java compiler page, Java,version set to 1.6
Important NOTE: Some students originally the project is good or the new guide down the project, after the completion of the JDK project is wrong, the project package name has a small red fork, but is not found the file error, at this time you have to see whether your project right-click-build Path Settings page has no error, Also want to see your JDK version of these steps are set to, less one step your project may error appear small red fork and will not appear in the specific file on the small red fork, even if your project can run, as if the operation is not a problem, until the deployment to the server real version problems appear, may not find the direction.
The most eclipse free and easy way to switch the JDK version of a project back and forth