This commit is contained in:
Phillip Webb
2016-10-11 22:21:03 -07:00
parent d3e06c4627
commit d818a09ed8
27 changed files with 100 additions and 102 deletions

View File

@@ -51,8 +51,16 @@ public class RunProcess {
private volatile long endTime;
/**
* Creates new {@link RunProcess} instance for the specified command
* and working directory.
* Creates new {@link RunProcess} instance for the specified command.
* @param command the program to execute and it's arguments
*/
public RunProcess(String... command) {
this(null, command);
}
/**
* Creates new {@link RunProcess} instance for the specified working directory and
* command.
* @param workingDirectory the working directory of the child process or {@code null}
* to run in the working directory of the current Java process
* @param command the program to execute and it's arguments
@@ -62,14 +70,6 @@ public class RunProcess {
this.command = command;
}
/**
* Creates new {@link RunProcess} instance for the specified command.
* @param command the program to execute and it's arguments
*/
public RunProcess(String... command) {
this(null, command);
}
public int run(boolean waitForProcess, String... args) throws IOException {
return run(waitForProcess, Arrays.asList(args));
}