[KARAF-2315] Move JDK test after JAVA_HOME definition in karaf.bat