Works when JDK is not installed

This is a fix if the jdk is not installed in windows. So it's possible set JAVA_HOME in the console.
I believe this will fail on mac due to `Darwin`