Class ProcessUtils
- java.lang.Object
-
- org.eclipse.dirigible.commons.process.ProcessUtils
-
public class ProcessUtils extends Object
The Class ProcessUtils.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_LOOP_COUNTThe default loop count.static intDEFAULT_WAIT_TIMEThe default wait time.
-
Constructor Summary
Constructors Constructor Description ProcessUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddEnvironmentVariables(ProcessBuilder processBuilder, Map<String,String> forAdding)Adds the environment variables.static ProcessBuildercreateProcess(String[] args)Creates the process.static voidremoveEnvironmentVariables(ProcessBuilder processBuilder, List<String> forRemoving)Removes the environment variables.static ProcessstartProcess(String[] args, ProcessBuilder processBuilder)Start process.static String[]translateCommandline(String toProcess)Translate commandline.
-
-
-
Method Detail
-
createProcess
public static ProcessBuilder createProcess(String[] args) throws IOException
Creates the process.- Parameters:
args- the args- Returns:
- the process builder
- Throws:
IOException- Signals that an I/O exception has occurred.
-
addEnvironmentVariables
public static void addEnvironmentVariables(ProcessBuilder processBuilder, Map<String,String> forAdding)
Adds the environment variables.- Parameters:
processBuilder- the process builderforAdding- the for adding
-
removeEnvironmentVariables
public static void removeEnvironmentVariables(ProcessBuilder processBuilder, List<String> forRemoving)
Removes the environment variables.- Parameters:
processBuilder- the process builderforRemoving- the for removing
-
startProcess
public static Process startProcess(String[] args, ProcessBuilder processBuilder) throws IOException
Start process.- Parameters:
args- the argsprocessBuilder- the process builder- Returns:
- the process
- Throws:
IOException- Signals that an I/O exception has occurred.
-
-