if $JAVA_HOME is invalid, fall back to searching