
1. JAVA_HOME is based on the JDK installation directory. By default, JDK will be installed in C:\Program Files\Java\jdkxxx unless your change the directory to specific location. So, the first thing you need to do is to locate the JDK installation directory. In this example, the directory is,
C:\Program Files\Java\jdk1.7.0
2. Now, you can proceed to set the JAVA_HOME environment variable. Right click to your My Computer > Advanced >Environment Variables. Click New under System variables. On the New System Variable tab, fill in the Variable name as JAVA_HOME and Variable value with the location of the JDK directory.