| java.lang.Object org.objectweb.common.Cmd
Cmd | public class Cmd (Code) | | This class allows to run a command in sub-process.
author: Helene Joanin : Initial developer author: Christophe Ney : Fix to handle arguments containing white spaces. author: Nozomi Matsumura : GenIC i18n problem. GenIC invoke javac and javac's output has non asc-ii characters, author: javac's output did not show collectly. author: Guillaume Tulloup : Invoke directly the com.sun.tools.javac.Main.compile() method to work around a limitation on Windows. author: (See bug #100587) author: Helene Joanin : Invoke directly the com.sun.tools.rmic.Main.compile() method to work around a limitation on Windows. |
Constructor Summary | |
public | Cmd(String cmd, boolean invoke) Construtor method of Cmd class. | public | Cmd(String cmd) Construtor method of Cmd class. | public | Cmd(String cmd, String[] env, boolean invoke) Construtor method of Cmd class. |
Cmd | public Cmd(String cmd, boolean invoke)(Code) | | Construtor method of Cmd class.
Parameters: cmd - command Parameters: invoke - try to invoke directly the method of the java class of thecommand |
Cmd | public Cmd(String cmd)(Code) | | Construtor method of Cmd class. Equivalent to Cmd(cmd, false).
Parameters: cmd - command |
Cmd | public Cmd(String cmd, String[] env, boolean invoke)(Code) | | Construtor method of Cmd class.
Parameters: cmd - command Parameters: env - environment of the command Parameters: invoke - invoke the compile method of the class instead of execute the command |
addArgument | public void addArgument(String arg)(Code) | | Add a new argument to the command.
Parameters: arg - argument added to the tail of the command argument list |
addArguments | public void addArguments(List args)(Code) | | Add a new argument to the command.
Parameters: args - argument added to the tail of the command argument list |
getCommandLine | public Iterator getCommandLine()(Code) | | iterator over the command line |
run | public boolean run()(Code) | | Execute the command. (In case of the exit value of the command is not 0,
the output and error streams of the command is traced.)
false if the command cannot be executed, or if its exit value isnot 0. |
toString | public String toString()(Code) | | the string representation of the object for UI purpose |
|
|