public interface ExecuteCommands
Loosely based on Example1.java from http://java.sun.com/products/jfc/tsc/articles/threads/threads2.html
See also http://developer.java.sun.com/developer/qow/archive/135/index.jsp (1/11: Broken) and http://jw.itworld.com/javaworld/jw-12-2000/jw-1229-traps.html.
StreamExec
Modifier and Type | Method and Description |
---|---|
void |
appendToPath(java.lang.String directoryName)
Append to the path of the subprocess.
|
void |
cancel()
Cancel any running commands.
|
void |
clear()
Clear the text area, status bar and progress bar.
|
java.lang.String |
getenv(java.lang.String key)
Get the value of the environment of the subprocess.
|
int |
getLastSubprocessReturnCode()
Return the return code of the last subprocess that was executed.
|
void |
setCommands(java.util.List commands)
Set the list of commands.
|
void |
setWorkingDirectory(java.io.File workingDirectory)
Set the working directory of the subprocess.
|
void |
start()
Start running the commands.
|
void |
stderr(java.lang.String text)
Append the text message to stderr.
|
void |
stdout(java.lang.String text)
Append the text message to stderr.
|
void |
updateStatusBar(java.lang.String text)
Set the text of the status bar.
|
void appendToPath(java.lang.String directoryName)
directoryName
- The name of the directory to append to the path.void cancel()
void clear()
java.lang.String getenv(java.lang.String key)
key
- The key to be looked up.int getLastSubprocessReturnCode()
void setCommands(java.util.List commands)
commands
- A list of Strings, where each element is a command.void setWorkingDirectory(java.io.File workingDirectory)
workingDirectory
- The working directory of the
subprocess. If this argument is null, then the subprocess is
executed in the working directory of the current process.void start()
void stderr(java.lang.String text)
text
- The text to append to standard error.void stdout(java.lang.String text)
text
- The text to append to standard out.void updateStatusBar(java.lang.String text)
text
- The text with which the status bar is updated.