org.objectweb.common.Cmd Class Reference

List of all members.

Public Member Functions

 Cmd (String cmd, boolean invoke)
 Cmd (String cmd)
 Cmd (String cmd, String[] env, boolean invoke)
void addArgument (String arg)
void addArguments (List args)
boolean run ()
String toString ()

Detailed Description

This class allows to run a command in sub-process.
Author:
Helene Joanin : Initial developer

Christophe Ney : Fix to handle arguments containing white spaces.

Nozomi Matsumura : GenIC i18n problem. GenIC invoke javac and javac's output has non asc-ii characters, javac's output did not show collectly.

Guillaume Tulloup : Invoke directly the com.sun.tools.javac.Main.compile() method to work around a limitation on Windows. (See bug #100587)

Helene Joanin : Invoke directly the com.sun.tools.rmic.Main.compile() method to work around a limitation on Windows.

Definition at line 50 of file Cmd.java.


Constructor & Destructor Documentation

org.objectweb.common.Cmd.Cmd String  cmd,
boolean  invoke
 

Construtor method of Cmd class.

Parameters:
cmd command
invoke try to invoke directly the method of the java class of the command

Definition at line 82 of file Cmd.java.

org.objectweb.common.Cmd.Cmd String  cmd  ) 
 

Construtor method of Cmd class. Equivalent to Cmd(cmd, false).

Parameters:
cmd command

Definition at line 91 of file Cmd.java.

org.objectweb.common.Cmd.Cmd String  cmd,
String[]  env,
boolean  invoke
 

Construtor method of Cmd class.

Parameters:
cmd command
env environment of the command
invoke invoke the compile method of the class instead of execute the command

Definition at line 101 of file Cmd.java.


Member Function Documentation

void org.objectweb.common.Cmd.addArgument String  arg  ) 
 

Add a new argument to the command.

Parameters:
arg argument added to the tail of the command argument list

Definition at line 111 of file Cmd.java.

Referenced by org.objectweb.jonas_ejb.genic.GenIC.compilClasses(), org.objectweb.jonas_ws.wsgen.generator.Generator.compile(), org.objectweb.jonas_lib.genclientstub.generator.Generator.generate(), and org.objectweb.jonas_ejb.genidl.GenIDL.generate().

void org.objectweb.common.Cmd.addArguments List  args  ) 
 

Add a new argument to the command.

Parameters:
args argument added to the tail of the command argument list

Definition at line 119 of file Cmd.java.

Referenced by org.objectweb.jonas_ejb.genic.GenIC.compilClasses(), org.objectweb.jonas_ws.wsgen.generator.Generator.compile(), org.objectweb.jonas_lib.genclientstub.generator.Generator.generate(), and org.objectweb.jonas_ejb.genidl.GenIDL.generate().

boolean org.objectweb.common.Cmd.run  ) 
 

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.)

Returns:
false if the command cannot be executed, or if its exit value is not 0.

Definition at line 131 of file Cmd.java.

Referenced by org.objectweb.jonas_ejb.genic.GenIC.compilClasses(), org.objectweb.jonas_ws.wsgen.generator.Generator.compile(), org.objectweb.jonas_lib.genclientstub.generator.Generator.generate(), and org.objectweb.jonas_ejb.genidl.GenIDL.generate().

String org.objectweb.common.Cmd.toString  ) 
 

Returns:
the string representation of the object for UI purpose

Definition at line 218 of file Cmd.java.

Referenced by org.objectweb.jonas_ejb.genic.GenIC.compilClasses(), org.objectweb.jonas_ws.wsgen.generator.Generator.compile(), org.objectweb.jonas_lib.genclientstub.generator.Generator.generate(), and org.objectweb.jonas_ejb.genidl.GenIDL.generate().


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:06:05 2005 for JOnAS by  doxygen 1.3.9.1