Add JAVA_HOME global environment variable. (Task #1178)