SAMZA-443; only set JAVA_HOME if it's been defined via task.java.home or yarn.am.java.home