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)).
-
verbose
-
-
Exec()
-
-
exec(String)
- Starts a process to execute the command.
-
exec(String, boolean, boolean)
-
-
execPrint(String)
- Starts a process to execute the command.
-
execPrintWait(String)
- Starts a process to execute the command.
-
execWait(String)
- Starts a process to execute the command.
-
printError(String)
-
-
printError(String, Exception)
-
-
printSeparator()
-
-
setVerbose(boolean)
- Determines if the Exec class should print which
commands are being executed, and print error messages if
a problem is found.
verbose
private static boolean verbose
Exec
public Exec()
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.
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.
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.
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.
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.
exec
private static boolean exec(String command,
boolean printResults,
boolean wait)
printError
private static void printError(String command,
Exception e)
printError
private static void printError(String command)
printSeparator
private static void printSeparator()
All Packages Class Hierarchy This Package Previous Next Index