...
- Right click My Computer.
- Click Properties.
- Click the Advanced tab (or click Advanced system settings in Windows Vista.)
- Click the Environment Variables.
- Under System variables, click New.
- Set Variable name to JAVA_HOME and Variable value to the path of JDK (C:\Program Files\Java\jdk1.8.0_05).
- Click OK.
- Click OK on the Advanced tab to close the window.
To verify if your JAVA_HOME is set, follow the steps below :
Open a command prompt and type java -version and you should see something as shown below:
...