Class CmdRunner
java.lang.Object
org.openjump.core.ui.plugin.customize.CmdRunner
- Author:
- Larry Becker This class launches exernal programs with command line options. Stack traces are printed when exceptions occur.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddEnviroment(String enviromentVariable, String value) static Stringstatic booleanvoidEssentialy a wrapper for Runtime.getRuntime().exec() that waits and catches exceptions.voidRun command line, wait and catch exceptionsString[]runAndGetOutput(String command, char delimiter) voidRun command line and do not wait for process to end
-
Constructor Details
-
CmdRunner
public CmdRunner()
-
-
Method Details
-
run
Essentialy a wrapper for Runtime.getRuntime().exec() that waits and catches exceptions.- Parameters:
runStr- a command and its parametersrunAndWait- True - wait for process to end, False - do not wait for process to end
-
addEnviroment
-
runLater
Run command line and do not wait for process to end- Parameters:
commandLine- - command to run - must be executable at system command line.delimiter- - character used to delimit parameters - must not occur inside parameters.
-
run
Run command line, wait and catch exceptions- Parameters:
commandLine- - command to run - must be executable at system command line.delimiter- - character used to delimit parameters - must not occur inside parameters.
-
runAndGetOutput
-
getOsName
-
isWindows
public static boolean isWindows()
-