Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Launch Java process programmatically in Java

In some cases while working on some automation testcase, developers would like to launch Java process programmatically so that the tests can be ran without manual intervention. Java provides such methods to achieve this.ProcessBuilder can be used to build a Java process which can be launched when everything is ready. Basically it can take a list of parameters which are similar to the command line options/arguments. For example, if you want to launch a Java process, you can do following.public final class JavaProcess { private String output = ""; private String javaHome = ""; public ...

8,250 0       JAVA COMMAND LINE PROCESSBUILDER