Configure JAVA_HOME and SCALA_HOME from environment