In Windows, when you install java 8, the path will be C:\Program Files\Java\jre1.8.0_431\bin It will not have JDK folder. if you add this in environment variable, %JAVA_HOME% C:\Program Files\Java\jre1.8.0_431
and value should be in the path: %JAVA_HOME%/bin
it works for me. Hopefully it should work for you as well