Sunteți pe pagina 1din 3

Updating the default JDK in Eclipse

When you install Eclipse it will look for the most up-to-date version of Java to link to. However if you
later update your Java JDK version you need to change the path in Eclipse. Follow these instructions to
check your current version and update if necessary.
First, open Eclipse. From the Window menu choose Preferences

Expand the Java tab and select the Installed JREs tab to view this window. There may be multiple jdks
listed, but the highest value should be selected. If it is not the latest version (we are using 1.6 this
semester), you need to update.

Start by downloading the Java 1.6 JDK (following the instructions provided on the download document).

Now you need to locate the jdk1.6 update 2 folder. Go to Windows Explorer and search for jdk1.6.0_02
- note you are not looking for the patch.

Make note of its location (mine is in the root directory of the D-drive).
Now return to Eclipse and if you have closed the preferences window, open it again
(Windows->preferences: 1) expand Java and 2) select Installed JREs) (this is somewhat confusing
because we need to add the JDK not the JRE), 3) click Add, 4) enter the name for the JRE, and 5) Browse
to 6) locate the JDK you searched for earlier (recall mine was on the D-drive) and finally, 7) click OK.

You will see a long list of files to be added. Click OK at the bottom of the window

Here select the jdk1.6 so it will be used as the default path. Click OK and all should be good!