Package org.bytedeco.javacpp.tools
Class CommandExecutor
java.lang.Object
org.bytedeco.javacpp.tools.CommandExecutor
A wrapper for ProcessBuilder that can be overridden easily for frameworks like Gradle that don't support it well.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
executeCommand
(List<String> command, File workingDirectory, Map<String, String> environmentVariables) Executes a command withProcessBuilder
, but also logs the call and redirects its input and output to our process.
-
Field Details
-
logger
-
-
Constructor Details
-
CommandExecutor
-
-
Method Details
-
executeCommand
public int executeCommand(List<String> command, File workingDirectory, Map<String, String> environmentVariables) throws IOException, InterruptedExceptionExecutes a command withProcessBuilder
, but also logs the call and redirects its input and output to our process.- Parameters:
command
- to haveProcessBuilder
executeworkingDirectory
- to pass toProcessBuilder.directory()
environmentVariables
- to put inProcessBuilder.environment()
- Returns:
- the exit value of the command
- Throws:
IOException
InterruptedException
-