类 RunProcess
java.lang.Object
org.springframework.boot.loader.tools.RunProcess
Utility used to run a process.
- 从以下版本开始:
- 1.1.0
- 作者:
- Phillip Webb, Dave Syer, Andy Wilkinson, Stephane Nicoll, Dmytro Nosan
-
构造器概要
构造器构造器说明RunProcess(File workingDirectory, String... command) Creates newRunProcessinstance for the specified working directory and command.RunProcess(String... command) Creates newRunProcessinstance for the specified command. -
方法概要
修饰符和类型方法说明Return the running process.booleanReturn if the process was stopped.booleanvoidkill()Kill this process.intint
-
构造器详细资料
-
RunProcess
Creates newRunProcessinstance for the specified command.- 参数:
command- the program to execute and its arguments
-
RunProcess
Creates newRunProcessinstance for the specified working directory and command.- 参数:
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
-
-
方法详细资料
-
run
- 抛出:
IOException
-
run
public int run(boolean waitForProcess, Collection<String> args, Map<String, String> environmentVariables) throws IOException- 抛出:
IOException
-
getRunningProcess
Return the running process.- 返回:
- the process or
null
-
handleSigInt
public boolean handleSigInt()Return if the process was stopped.- 返回:
trueif stopped
-
kill
public void kill()Kill this process. -
hasJustEnded
public boolean hasJustEnded()
-