How to Use a Different JDK Version in an Eclipse Project
When working with Eclipse, you may need to specify a different Java Development Kit (JDK) version for a specific project. This can be necessary if the project requires compatibility with an earlier Java version.
Problem:
You want to create a project that requires Java 1.5, but you have Java 1.6 installed and Eclipse is compiling with 1.6. You want to know if there's a way to make Eclipse compile the project using Java 1.5.
Solution:
Adding the Java 1.5 JRE
To add the Java 1.5 JRE to Eclipse:
Changing the Compiler Settings
Instead of adding a different JRE, you can change the compiler settings in Eclipse:
Considerations:
The above is the detailed content of How to Compile an Eclipse Project with a Different JDK Version?. For more information, please follow other related articles on the PHP Chinese website!