|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ifeth.sehr.lib.SysExec
Run a external process in three ways:
javac
followed by
java
).
ls
.
SysExec.exec("/usr/ucb/lpr Some-File");
SysExec.execWait("/usr/local/bin/javac Foo.java"); SysExec.execWait("/usr/local/bin/java Foo");
SysExec.execPrint("/usr/bin/ls -al");
Constructor Summary | |
SysExec()
|
Method Summary | |
static boolean |
exec(java.lang.String command)
Starts a process to execute the command. |
static boolean |
execPrint(java.lang.String command)
Starts a process to execute the command. |
static boolean |
execWait(java.lang.String command)
Starts a process to execute the command. |
static boolean |
getVerbose()
Let Exec print status messages |
static void |
main(java.lang.String[] args)
|
static void |
setVerbose(boolean verboseFlag)
Determines if the Exec class should print which commands are being executed, and print error messages if a problem is found. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SysExec()
Method Detail |
public static void setVerbose(boolean verboseFlag)
verboseFlag
- true: print, false: don't printpublic static boolean getVerbose()
public static boolean exec(java.lang.String command)
command
- The full pathname of the
command to be executed. No shell builtins
(e.g. "cd") or shell meta-chars (e.g. ">")
allowed.
public static boolean execWait(java.lang.String command)
command
- The full pathname of the
command to be executed. No shell builtins
or shell meta-chars allowed.
public static boolean execPrint(java.lang.String command)
command
- The full pathname of the
command to be executed. No shell builtins
or shell meta-chars allowed.
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |