Adding the JDK to the PATH

This document assumes you've already downloaded and installed the JDK. If you haven't done that, do it first, then return here.

Okay, next you need the exact location of the JDK installation directory. It is probably either:

Make sure you know what this is before proceeding. You can write it down, or highlight it and right-click and copy it to the clipboard.

Now we need to add this location to the PATH variable.

Windows 7
Select Start -> Computer -> System Properties -> Advanced system settings -> Environment Variables -> System variables -> Path
Windows Vista
Select Start -> My Computer -> Properties -> Advanced -> Environment Variables -> System variables -> Path
Windows XP
Select Start -> Control Panel -> System -> Advanced -> Environment Variables -> System variables -> Path
(In the Control Panel, you might need to "Switch to Classic View" to see the icon for "System".)

Once that's open, add C:\Program Files\Java\jdk1.6.0_27\bin; (or whatever the correct path is) in front of whatever is already there in the Path variable. Don't miss the semicolon!

On my computer, the path now looks like this:
C:\Program Files\Java\jdk1.6.0_27\bin;C:\WINDOWS\system32;C:\WINDOWS; etc....

Click OK three times to close everything.

Once you've added Java's bin folder to the PATH environment variable, you can try the Compiler Check assignment to make sure you've done it right.

updated 2011-08-31




©2013 Graham Mitchell

This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.
Creative Commons License