Handle $JAVACMD properly while still respecting $JAVA_HOME