I had the JAVA_HOME set and it suddenly stopped working, I upgraded my JDK and set the enviroment variable to the new location and it was sorted.