To solve this problem,
- Go to the Environment Variables ( Control Panel -> System -> Advanced System Settings -> Advanced (tab) -> Environment Variables).
- Add JDK_HOME with the correct path under System Variable.
Example
variable -> JDK_HOME
value -> c:\program files\java\jdk1.7.0.xx
Note - path may be differ in your case, check before adding
If still not working, add another variable
named "JAVA_HOME" and same value like above.

Join the conversation! Your thoughts help the community grow.