Replaced `write_exec_script` with `env_script_all_files`, which sets `JAVA_HOME`.