Class RunProcess
java.lang.Object
org.springframework.boot.loader.tools.RunProcess
-
Constructor Summary
ConstructorsConstructorDescriptionRunProcess(@Nullable File workingDirectory, String... command) Creates newRunProcessinstance for the specified working directory and command.RunProcess(String... command) Creates newRunProcessinstance for the specified command. -
Method Summary
-
Constructor Details
-
RunProcess
Creates newRunProcessinstance for the specified command.- Parameters:
command- the program to execute and its arguments
-
RunProcess
Creates newRunProcessinstance for the specified working directory and command.- Parameters:
workingDirectory- the working directory of the child process ornullto run in the working directory of the current Java processcommand- the program to execute and its arguments
-
-
Method Details
-
run
- Throws:
IOException
-
run
public int run(boolean waitForProcess, Collection<String> args, Map<String, String> environmentVariables) throws IOException- Throws:
IOException
-
getRunningProcess
Return the running process.- Returns:
- the process or
null
-
handleSigInt
public boolean handleSigInt()Return if the process was stopped.- Returns:
trueif stopped
-
kill
public void kill()Kill this process. -
hasJustEnded
public boolean hasJustEnded()
-