public class CommandLine
extends java.lang.Object
Constructor and Description |
---|
CommandLine(java.lang.String[] cmdarray) |
CommandLine(java.lang.String executable,
java.lang.String... args) |
Modifier and Type | Method and Description |
---|---|
void |
checkForError() |
void |
copyOutputTo(java.io.OutputStream out) |
int |
destroy()
Destroy the current command.
|
void |
execute() |
void |
executeAsync() |
int |
getExitCode() |
static java.lang.String |
getLibraryPathPropertyName() |
java.lang.String |
getStdOut() |
boolean |
isRunning()
Check whether the current command is still executing.
|
boolean |
isSuccessful() |
void |
setDynamicLibraryPath(java.lang.String newLibraryPath) |
void |
setEnvironmentVariable(java.lang.String name,
java.lang.String value)
Adds the specified environment variable.
|
void |
setEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environment)
Adds the specified environment variables.
|
void |
setInput(java.lang.String allInput) |
void |
setWorkingDirectory(java.lang.String workingDirectory) |
java.lang.String |
toString() |
void |
updateDynamicLibraryPath(java.lang.String extraPath) |
void |
waitFor() |
void |
waitFor(long timeout) |
public CommandLine(java.lang.String executable, java.lang.String... args)
public CommandLine(java.lang.String[] cmdarray)
public void setEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environment)
environment
- the variables to addjava.lang.IllegalArgumentException
- if any value given is null (unsupported)public void setEnvironmentVariable(java.lang.String name, java.lang.String value)
name
- the name of the environment variablevalue
- the value of the environment variablejava.lang.IllegalArgumentException
- if the value given is null (unsupported)public void setDynamicLibraryPath(java.lang.String newLibraryPath)
public void updateDynamicLibraryPath(java.lang.String extraPath)
public static java.lang.String getLibraryPathPropertyName()
public void executeAsync()
public void execute()
public void waitFor()
public void waitFor(long timeout)
public boolean isSuccessful()
public int getExitCode()
public java.lang.String getStdOut()
public int destroy()
public boolean isRunning()
public void setInput(java.lang.String allInput)
public void setWorkingDirectory(java.lang.String workingDirectory)
public java.lang.String toString()
toString
in class java.lang.Object
public void copyOutputTo(java.io.OutputStream out)
public void checkForError()