Auto-set JAVA_HOME on mac, if possible