| java.lang.Object com.izforge.izpack.util.FileExecutor
FileExecutor | public class FileExecutor (Code) | | Executes a bunch of files. This class is intended to do a system dependent installation
postprocessing. Executable file can be any file installed with current package. After execution
the file can be optionally removed. Before execution on Unix systems execution flag will be set
on processed file.
author: Olexij Tkatchenko |
Method Summary | |
public int | executeCommand(String[] params, String[] output) Executed a system command and waits for completion. | public int | executeFiles(int currentStage, AbstractUIHandler handler) Executes files specified at construction time.
Parameters: currentStage - the stage of the installation Parameters: handler - The AbstractUIHandler to notify on errors. | public static String | getExecOutput(String[] aCommandLine) | public static String | getExecOutput(String[] aCommandLine, boolean forceToGetStdOut) Executes the given Command and gets the result of StdOut, or if exec returns !=0: StdErr. |
FileExecutor | public FileExecutor(Collection<ExecutableFile> files)(Code) | | Constructs a new executor. The executable files specified must have pretranslated paths
(variables expanded and file separator characters converted if necessary).
Parameters: files - the executable files to process |
FileExecutor | public FileExecutor()(Code) | | Constructs a new executor.
|
executeCommand | public int executeCommand(String[] params, String[] output)(Code) | | Executed a system command and waits for completion.
Parameters: params - system command as string array Parameters: output - contains output of the command index 0 = standard output index 1 = standarderror exit status of process |
executeFiles | public int executeFiles(int currentStage, AbstractUIHandler handler)(Code) | | Executes files specified at construction time.
Parameters: currentStage - the stage of the installation Parameters: handler - The AbstractUIHandler to notify on errors. 0 on success, else the exit status of the last failed command |
getExecOutput | public static String getExecOutput(String[] aCommandLine)(Code) | | Gets the output of the given (console based) commandline
Parameters: aCommandLine - to execute the result of the command |
getExecOutput | public static String getExecOutput(String[] aCommandLine, boolean forceToGetStdOut)(Code) | | Executes the given Command and gets the result of StdOut, or if exec returns !=0: StdErr.
Parameters: aCommandLine - aCommandLine to execute Parameters: forceToGetStdOut - if true returns stdout the result of the command stdout or stderr if exec returns !=0 |
|
|