I had the same problem as yours and fixed it like this:
In the system variables, I created a new variable called JAVA_HOME, and I set the value: C: \ Program Files \ Java \ jdk1.7.0_17. After that, I edited Path, which is also in the system variables, and I added:;% JAVA_HOME% \ bin.
Hope this helps you!
source share