You can set overall workspace properties to use one version of Java and set individual project properties to use another.
- To set overall workspace properties, click on Window > Preferences, then navigate to Java > Compiler.
- To set project properties, right-click on the project and select Properties. Navigate to Java Compiler and check "Enable project specific settings"
You can choose from among the installed JREs for either setting. To tell Eclipse about a newly installed JRE, you can open the workspace preferences and navigate to Java > Installed JREs and then click the "Add" button.