public class RunProcess extends Object
| Constructor and Description | 
|---|
| RunProcess(File workingDirectory,
          String... command)Creates new  RunProcessinstance for the specified working directory and
 command. | 
| RunProcess(String... command)Creates new  RunProcessinstance for the specified command. | 
| Modifier and Type | Method and Description | 
|---|---|
| Process | getRunningProcess()Return the running process. | 
| boolean | handleSigInt()Return if the process was stopped. | 
| boolean | hasJustEnded() | 
| void | kill()Kill this process. | 
| int | run(boolean waitForProcess,
   Collection<String> args,
   Map<String,String> environmentVariables) | 
| int | run(boolean waitForProcess,
   String... args) | 
public RunProcess(String... command)
RunProcess instance for the specified command.command - the program to execute and its argumentspublic RunProcess(File workingDirectory, String... command)
RunProcess instance for the specified working directory and
 command.workingDirectory - the working directory of the child process or null
 to run in the working directory of the current Java processcommand - the program to execute and its argumentspublic int run(boolean waitForProcess,
               String... args)
        throws IOException
IOExceptionpublic int run(boolean waitForProcess,
               Collection<String> args,
               Map<String,String> environmentVariables)
        throws IOException
IOExceptionpublic Process getRunningProcess()
nullpublic boolean handleSigInt()
true if stoppedpublic void kill()
public boolean hasJustEnded()
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.