Fix bat script so it works on Windows with JRE's that don't install java in the PATH
(cherry picked from commit 318f6a93b8b86aa70b73c5b17c3cac7ec9f791be)