ProcessBuilder (List<String> escapedCommands) { ProcessBuilder builder = new ProcessBuilder(escapedCommands); setupEnvironment(builder.environment()); builder.directory(myWorkDirectory); builder.redirectErrorStream(myRedirectErrorStream); if (myInputFile != null) { builder.redirectInput(ProcessBuilder.Redirect.from(myInputFile)); } return buildProcess(builder); }