Handles OpenJDK version output on Windows

OpenJDK on Windows does not output ``java`` when ``java -version`` is issued but instead prints ``openjdk`` and then the version information. The script expected ``java`` to work before this fix.