added copy-as-path and export JAVA_HOME