◆ ShellExecutor()
org.turro.elephant.impl.util.ShellExecutor.ShellExecutor |
( |
| ) |
|
◆ execute()
int org.turro.elephant.impl.util.ShellExecutor.execute |
( |
String |
command | ) |
|
Definition at line 62 of file ShellExecutor.java.
65 String cmd[] =
new String[3];
71 Runtime rt = Runtime.getRuntime();
72 Logger.getLogger(
ShellExecutor.class.getName()).log(Level.INFO,
"Executor: " + command);
74 Process proc = rt.exec(cmd);
76 StreamExecutor errorStream =
new StreamExecutor(proc.getErrorStream(), Level.SEVERE);
78 StreamExecutor outputStream =
new StreamExecutor(proc.getInputStream(), Level.INFO);
83 int exitVal = proc.waitFor();
85 Logger.getLogger(
ShellExecutor.class.getName()).log(Level.INFO,
"Executor exit value for " + command +
": " + exitVal);
89 }
catch (Throwable t) {
90 Logger.getLogger(
ShellExecutor.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), t);
The documentation for this class was generated from the following file: