Yes it's an old post, but this happened to me today, so here's how I fixed it:
It was an error installing the JDK
Installing the JDK by extraction is a two-step process:
[*]extract the tools zip
[*]unpack a few files from within the tree
Handy script to unpack the files, courtesy of Nick Russler:
for /R %f in (.\*.pack) do @"D:\JavaJDK\bin\unpack200" -r -v -l "" "%f" "%~pf%~nf.jar"
https://www.whitebyte.info/programming/java/how-to-install-a-portable-jdk-in-windows-without-admin-rights