In Eclipse select Window > Preferences > Java > Installed JREs.
Click Add.
Browse to the root of the JDK directory (e.g. C:\Program Files\Java\jdk1.5.0_05)
Give the "JRE" a name (e.g. JDK 1.5.0_05)
OK the dialog.
Check the JDK, uncheck the JRE.
OK the dialog.
Your project should automatically switch to using this new JDK. If it does not:
Right click the project directory, select Properties > Java Build Path > Libraries.
Select the JRE System Library, click Edit.
Select Alternate JRE, select the JDK, OK all dialogs.
Click Add.
Browse to the root of the JDK directory (e.g. C:\Program Files\Java\jdk1.5.0_05)
Give the "JRE" a name (e.g. JDK 1.5.0_05)
OK the dialog.
Check the JDK, uncheck the JRE.
OK the dialog.
Your project should automatically switch to using this new JDK. If it does not:
Right click the project directory, select Properties > Java Build Path > Libraries.
Select the JRE System Library, click Edit.
Select Alternate JRE, select the JDK, OK all dialogs.