private void initScriptProcessExecution(ProcessExecution processExecution, File scriptFile) { // For the script to work the current working dir must be set to the script's parent dir processExecution.setWorkingDirectory(scriptFile.getParent()); // Set necessary environment variables setProcessExecutionEnvironment(processExecution, this.serverComponent.getCatalinaHome().getPath(), this.serverComponent.getCatalinaBase().getPath()); initProcessExecution(processExecution); }
processExecution.setWorkingDirectory(file.getParent());
processExecution.setWorkingDirectory(file.getParent());
processExecution.setWorkingDirectory(startScriptFile.getParent()); processExecution.setCaptureOutput(true); processExecution.setWaitForCompletion(MAX_PROCESS_WAIT_TIME);