Windows 8
1) First install Java onto your machine
2) You then have to set your environment variable JAVA_HOME to be the location where the bin directory of all the .dlls and .exes are.
Right click the windows icon on the very bottom left. Select System
Click on the Environmental variable button. And look for the JAVA_HOME variable. If its there, edit it. If its not, click on ‘New’, and create the JAVA_HOME variable.
The Variable value is where the location is. What we’re looking for is the location to the bin folder where all the .exe and .dll are. Hence, after you install Java, its usually somewhere in C://Program Files/Java/JRE_x.xx.xx/.
In our case, if you start from the C directory, find Program Files, then find Java. In my case, I found it at C:\Program Files (x86)\Java\jre1.8.0_73
Thus, you just paste that into the environment variable.
3) you then have to add the directory location of the PATH variable. When you see it, click edit, and then go to the end of the string. Then type in:
;C:\Program Files (x86)\Java\jre1.8.0_73
notice the semi-colon. this is to separate this entry from the other entries.