On windows (Windows 10) you can solve the issue by installing jdk-8u201-windows-x64.exe and resetting the system environment variable to the correct version of the JAVA JDK:
JAVA_HOME -> C:\Program Files\Java\jdk1.8.0_201.
Don't forget to restart the terminal otherwise the resetting of the environment variable does not kick in.