public class ProcessStarter
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
ProcessStarter |
args(java.lang.Object... args)
Starts the Process using the given command-line arguments.
|
ProcessStarter |
env(java.lang.String name,
java.lang.Object value)
Includes the given Environment Variable as part of the start.
|
static ProcessStarter |
forClass(java.lang.Class<?> target)
Creates a new instance of the ProcessStarter class.
|
java.lang.Process |
start()
Executes the Class using the accumulated options.
|
ProcessStarter |
stdErr(java.lang.ProcessBuilder.Redirect redirect)
Redirects the Standard Err of the Process to the given Redirect.
|
ProcessStarter |
stdIn(java.lang.ProcessBuilder.Redirect redirect)
Redirects the Standard In of the Process to the given Redirect.
|
ProcessStarter |
stdOut(java.lang.ProcessBuilder.Redirect redirect)
Redirects the Standard Out of the Process to the given Redirect.
|
ProcessStarter |
sysProp(java.lang.String name,
java.lang.Object value)
Includes the given System Property as part of the start.
|
public static ProcessStarter forClass(java.lang.Class<?> target)
target - The Class to start. This class must have a static main() method defined in it.public ProcessStarter sysProp(java.lang.String name, java.lang.Object value)
name - The System Property Name.value - The System Property Value. This will have toString() invoked on it.public ProcessStarter env(java.lang.String name, java.lang.Object value)
name - The Environment Variable Name.value - The Environment Variable Value. This will have toString() invoked on it.public ProcessStarter stdOut(java.lang.ProcessBuilder.Redirect redirect)
redirect - The ProcessBuilder.Redirect to use.public ProcessStarter stdErr(java.lang.ProcessBuilder.Redirect redirect)
redirect - The ProcessBuilder.Redirect to use.public ProcessStarter stdIn(java.lang.ProcessBuilder.Redirect redirect)
redirect - The ProcessBuilder.Redirect to use.public ProcessStarter args(java.lang.Object... args)
args - The arguments to use.public java.lang.Process start()
throws java.io.IOException
java.io.IOException - If an error occurred.