Fixed java environment with ENV and errors by cd to the directory before running