I am trying to run a command using ProcessBuilder as below.
String[] cmdList = {"cmd.exe","/C","M:", "cd Test_SrcCd_Dev_Dyn","cleartool lsactivity -l TestActivity@My_PVOB"};
ProcessBuilder builder = new ProcessBuilder(cmdList);
From a command perspective I am basically want to asking process builder to do this.
1.Open cmd.exe
2 Open M:
3 cd Test_SrcCd_Dev_Dyn
4 Run my command i.e. cleartool lsactivity -l TestActivity@My_PVOB
My code returns null. Can someone please suggest the right way of creating the process builder to achieve the same.
Thanks in advance.