Added some functions
Made JAVA_HOME a dynamic location