public class CommandLine extends Object
Constructor and Description |
---|
CommandLine(String[] cmdarray) |
CommandLine(String executable,
String... args) |
Modifier and Type | Method and Description |
---|---|
void |
copyOutputTo(OutputStream out) |
int |
destroy()
Destroy the current command.
|
void |
execute() |
void |
executeAsync() |
static String |
find(String executable)
Deprecated.
Use the commandline itself to execute your command.
|
int |
getExitCode() |
static String |
getLibraryPathPropertyName() |
String |
getStdOut() |
boolean |
isRunning()
Check whether the current command is still executing.
|
boolean |
isSuccessful() |
void |
setDynamicLibraryPath(String newLibraryPath) |
void |
setEnvironmentVariable(String name,
String value)
Adds the specified environment variable.
|
void |
setEnvironmentVariables(Map<String,String> environment)
Adds the specified environment variables.
|
void |
setInput(String allInput) |
void |
setWorkingDirectory(String workingDirectory) |
String |
toString() |
void |
waitFor() |
public CommandLine(String[] cmdarray)
public void setEnvironmentVariables(Map<String,String> environment)
environment
- the variables to addIllegalArgumentException
- if any value given is null (unsupported)public void setEnvironmentVariable(String name, String value)
name
- the name of the environment variablevalue
- the value of the environment variableIllegalArgumentException
- if the value given is null (unsupported)public void setDynamicLibraryPath(String newLibraryPath)
public static String getLibraryPathPropertyName()
@Deprecated public static String find(String executable)
public void executeAsync()
public void execute()
public void waitFor()
public boolean isSuccessful()
public int getExitCode()
public String getStdOut()
public int destroy()
public boolean isRunning()
public void setInput(String allInput)
public void setWorkingDirectory(String workingDirectory)
public void copyOutputTo(OutputStream out)
Copyright © 2013. All Rights Reserved.