@Deprecated public final class ProcessLauncher extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ProcessLauncher.CommandNotExistsException
Deprecated.
Exception that is thrown when a command could not be executed because it (probably) does not exist at all.
|
static interface |
ProcessLauncher.OutputListener
Deprecated.
Classes implementing this interface can receive output generated by processes launched using the ProcessLauncher.
|
Constructor and Description |
---|
ProcessLauncher(ArrayList<?> commandList)
Deprecated.
Constructs new process launcher with the given command element list.
|
ProcessLauncher(ArrayList<?> commandList,
File baseDir)
Deprecated.
Constructs new process launcher with the given command element list and base directory.
|
ProcessLauncher(String commandLine)
Deprecated.
Constructs a new ProcessLauncher with the given command line.
|
ProcessLauncher(String[] commandArray)
Deprecated.
Constructs a new ProcessLauncher with the given command array.
|
ProcessLauncher(String[] commandArray,
File baseDir)
Deprecated.
Constructs a new ProcessLauncher with the given command array and base directory.
|
ProcessLauncher(String commandLine,
File baseDir)
Deprecated.
Constructs a new ProcessLauncher with the given command line and base directory
|
Modifier and Type | Method and Description |
---|---|
void |
abort()
Deprecated.
Tries to abort the currently running process.
|
void |
addOutputListener(ProcessLauncher.OutputListener listener)
Deprecated.
Add a listener for output from the to-be-launched process.
|
String |
getCommandLine()
Deprecated.
Get the commandline that is used to launch the process.
|
String |
getErrorOutput()
Deprecated.
Get error output, in case no listeners were registered - never returns null.
|
String |
getStandardOutput()
Deprecated.
Get standard output, in case no listeners were registered - never returns null.
|
boolean |
hasFinished()
Deprecated.
Check whether execution has finished.
|
int |
launch()
Deprecated.
Launches the process, and blocks until that process completes execution.
|
public ProcessLauncher(String commandLine)
commandLine
- command linepublic ProcessLauncher(String commandLine, File baseDir)
commandLine
- command linebaseDir
- base directorypublic ProcessLauncher(String[] commandArray)
commandArray
- command as array of stringspublic ProcessLauncher(String[] commandArray, File baseDir)
commandArray
- command as array of stringsbaseDir
- base directorypublic ProcessLauncher(ArrayList<?> commandList)
commandList
- command listpublic void addOutputListener(ProcessLauncher.OutputListener listener)
listener
- output listenerpublic String getStandardOutput()
public String getErrorOutput()
public String getCommandLine()
public boolean hasFinished()
public int launch() throws ProcessLauncher.CommandNotExistsException
ProcessLauncher.CommandNotExistsException
- If the command could not be executed because it does not existpublic void abort()
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.