Add Variables - Java
First, you need to Locating the Environment Variables
1. Open up the system properties (WinKey + Pause) and you should see the below screen.

2. From the system properties, tab select the "Advanced" link. This should take you to the below screen.

3. From the System Properties screen select the "Advanced Tab". On this screen click the "Environment Variables" button.
4. You should now be seeing something like the below screen.

Now You Are Ready To Add Variables - JAVA
In the system variables section click in the "New" button.
In here enter the variable name : JAVA_HOME
Enter the variable value as the location of the java jdk installed in the previous section. (This is assuming you already have installed Java SDK. If you haven't now is the time to do it)
For Example of my location below. (Please note the variable value will vary depending on your install location and version of the jdk)

Click ok to complete this action. Once completed you should see the JAVA_HOME variable in the list of system variables.
Next, you need to add the newly created JAVA_HOME variable on to your path.
To do this locate the "Path" variable in the system variables list. Select it and click the edit button.
This should bring up the below option.

Scroll to the end of the "variable value" field and append on the following
;%JAVA_HOME%\bin
Click "OK" to confirm and leave the edit path screen.
Once complete click "OK" to confirm and leave the Environment variables screen.
Next, open a new command prompt (Winkey + R then type cmd) and run "java -version" to verify that it is correctly installed.
If it is you should see something similar to the below screenshot.
