All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class DyGFuL.Exec

java.lang.Object
   |
   +----DyGFuL.Exec

public class Exec
extends Object
Cette classe simplifie l'acces a des processes externes (methode System.exec(String)).


Variable Index

 o verbose

Constructor Index

 o Exec()

Method Index

 o exec(String)
Starts a process to execute the command.
 o exec(String, boolean, boolean)
 o execPrint(String)
Starts a process to execute the command.
 o execPrintWait(String)
Starts a process to execute the command.
 o execWait(String)
Starts a process to execute the command.
 o printError(String)
 o printError(String, Exception)
 o printSeparator()
 o setVerbose(boolean)
Determines if the Exec class should print which commands are being executed, and print error messages if a problem is found.

Variables

 o verbose
 private static boolean verbose

Constructors

 o Exec
 public Exec()

Methods

 o setVerbose
 public 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. Default is true.

Parameters:
verboseFlag - true: print messages. False: don't.
 o exec
 public static boolean exec(String command)
Starts a process to execute the command. Returns immediately, even if the new process is still running.

Parameters:
command - The full pathname of the command to be executed. No shell builtins or shell meta-chars allowed.
Returns:
false if a problem is known to occur, but since this returns immediately, problems aren't usually found. Returns true otherwise.
 o execWait
 public static boolean execWait(String command)
Starts a process to execute the command. Waits for the process to finish before returning.

Parameters:
command - The full pathname of the command to be executed. No shell builtins or shell meta-chars allowed.
Returns:
false if a problem is known to occur, either due to an exception or from the subprocess returning a non-zero value. Returns true otherwise.
 o execPrint
 public static boolean execPrint(String command)
Starts a process to execute the command. Prints all output the command gives.

Parameters:
command - The full pathname of the command to be executed. No shell builtins or shell meta-chars allowed.
Returns:
false if a problem is known to occur, either due to an exception or from the subprocess returning a non-zero value. Returns true otherwise.
 o execPrintWait
 public static boolean execPrintWait(String command)
Starts a process to execute the command. Prints all output the command gives and waits for the process to finish before returning.

Parameters:
command - The full pathname of the command to be executed. No shell builtins or shell meta-chars allowed.
Returns:
false if a problem is known to occur, either due to an exception or from the subprocess returning a non-zero value. Returns true otherwise.
 o exec
 private static boolean exec(String command,
                             boolean printResults,
                             boolean wait)
 o printError
 private static void printError(String command,
                                Exception e)
 o printError
 private static void printError(String command)
 o printSeparator
 private static void printSeparator()

All Packages  Class Hierarchy  This Package  Previous  Next  Index