detect YARN and JAVA_HOME