|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.lib.util.Cmd
public class Cmd
This class allows to run a command in sub-process.
Constructor Summary | |
---|---|
Cmd(String cmd)
Construtor method of Cmd class. |
|
Cmd(String cmd,
boolean invoke)
Construtor method of Cmd class. |
|
Cmd(String cmd,
String[] env,
boolean invoke)
Construtor method of Cmd class. |
Method Summary | |
---|---|
void |
addArgument(String arg)
Add a new argument to the command. |
void |
addArguments(List args)
Add a new argument to the command. |
Iterator |
getCommandLine()
|
boolean |
run()
Execute the command. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Cmd(String cmd, boolean invoke)
cmd
- commandinvoke
- try to invoke directly the method of the java class of the
commandpublic Cmd(String cmd)
cmd
- commandpublic Cmd(String cmd, String[] env, boolean invoke)
cmd
- commandenv
- environment of the commandinvoke
- invoke the compile method of the class instead of execute the commandMethod Detail |
---|
public void addArgument(String arg)
arg
- argument added to the tail of the command argument listpublic void addArguments(List args)
args
- argument added to the tail of the command argument listpublic boolean run()
public Iterator getCommandLine()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |