check directories exist before stoppign processes. define java_home