Setup Command Path and Path on Windows

Start -> right click My Computer -> properties.

Advanced Settings Tab

click Environment Variables

Create a JAVA_HOME value pointing to your Java root directory (mine is C:\Java\jdk1.6.0)

Update your PATH by adding ;%JAVA_HOME%\BIN;

To validate, open a CMD prompt and type the following:

JAVA -version <enter>

You should see something like:

java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)