public class CommandExecutor extends Object
| Constructor and Description |
|---|
CommandExecutor(Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
int |
executeCommand(List<String> command,
File workingDirectory,
Map<String,String> environmentVariables)
Executes a command with
ProcessBuilder, but also logs the call
and redirects its input and output to our process. |
final Logger logger
public CommandExecutor(Logger logger)
public int executeCommand(List<String> command, File workingDirectory, Map<String,String> environmentVariables) throws IOException, InterruptedException
ProcessBuilder, but also logs the call
and redirects its input and output to our process.command - to have ProcessBuilder executeworkingDirectory - to pass to ProcessBuilder.directory()environmentVariables - to put in ProcessBuilder.environment()IOExceptionInterruptedExceptionCopyright © 2024. All rights reserved.