public class PluginUtils
extends java.lang.Object
| Constructor and Description |
|---|
PluginUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
execCommand(java.io.File workingDir,
java.io.File stdout,
java.io.File stderr,
java.lang.String cmdPath,
boolean isBatchCmdOnWindows,
java.lang.String... args)
Launches an OS process, waits for it to complete (for a maximum of 1 minute),
and returns the exit status.
|
static java.lang.String |
generateStackTrace(java.lang.Throwable error,
java.util.List<java.lang.String> stackTraceFilterPrefixes)
Generate a stack trace for an error and all its nested exceptions, with any
stack trace filters applied.
|
public static int execCommand(java.io.File workingDir,
java.io.File stdout,
java.io.File stderr,
java.lang.String cmdPath,
boolean isBatchCmdOnWindows,
java.lang.String... args)
throws java.lang.Exception
workingDir - optional current directory the process should run in.stdout - optional destination file for standard output of processstderr - optional destination file for standard error of processcmdPath - required path to executable for process.isBatchCmdOnWindows - if true, then cmd.exe will be used to
run executable at cmdPath on Windows OS. Useful for running .BAT files and
files with other non .EXE extensions which will fail to launch directly on Windows.args - command line argumentsjava.lang.Exceptionpublic static java.lang.String generateStackTrace(java.lang.Throwable error,
java.util.List<java.lang.String> stackTraceFilterPrefixes)
error - stackTraceFilterPrefixes -