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
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.
-
Field Details
-
DEFAULT_WAIT_TIME
public static int DEFAULT_WAIT_TIMEThe default wait time. -
DEFAULT_LOOP_COUNT
public static int DEFAULT_LOOP_COUNTThe default loop count.
-
-
Constructor Details
-
ProcessUtils
public ProcessUtils()
-
-
Method Details
-
createProcess
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 IOExceptionStart process.- Parameters:
args- the argsprocessBuilder- the process builder- Returns:
- the process
- Throws:
IOException- Signals that an I/O exception has occurred.
-
translateCommandline
Translate commandline.- Parameters:
toProcess- the to process- Returns:
- the string[]
-