1. go to java installation directory, generally it is in program files, you will see a folder with name Java
open the folder you will find the jdk directory click on jdk folder again
2. click on bin folder single click on the address bar of the window, copy the address.
3. open My Computer then right click and select Properties , click on the Advance tab and then click on
4. write the variable as JAVA_HOME in variable name and paste the copied values from bin folder as variable value below variable name.
5. click ok and then again ok to parent window.