|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.tools.gui.util.SysCommandExecutor
public class SysCommandExecutor
This class is used to execute command line at from Java runtime Usage of following class ...
SysCommandExecutor cmdExecutor = SysCommandExecutor.getInstance();
int exitStatus = cmdExecutor.runCommand(commandLine);
String cmdError = cmdExecutor.getCommandError();
String cmdOutput = cmdExecutor.getCommandOutput();
Method Summary | |
---|---|
java.lang.String |
getCommandError()
get the error message after command execution |
java.lang.String |
getCommandOutput()
get the output of command |
static SysCommandExecutor |
getInstance()
Get reference to the SysCommandExecutor |
int |
runCommand(java.lang.String commandLine)
execute the command |
void |
setEnvironmentVar(java.lang.String name,
java.lang.String value)
|
void |
setWorkingDirectory(java.lang.String workingDirectory)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SysCommandExecutor getInstance()
SysCommandExecutor
SysCommandExecutor
public void setWorkingDirectory(java.lang.String workingDirectory)
public void setEnvironmentVar(java.lang.String name, java.lang.String value)
public java.lang.String getCommandOutput()
public java.lang.String getCommandError()
public int runCommand(java.lang.String commandLine) throws java.lang.Exception
commandLine
- command
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |