Is there any ways to save the final output from command prompt to a text file after the program finished running? I have tried it with ProcessBuilder and it does not work. (Reason because my output does not appear immediately, it goes through a short processing time before the output is loaded onto the command prompt screen) in java.
String command = "cmd /c start cmd /k E:\\vol231.exe -f E:\\KOHMOHOJOJO-PC-20140714-152414.raw imageinfo > output.txt";
Process p = Runtime.getRuntime().exec(command);
It actually takes around 2-5 mins for it to process.
I referred to several websites but it still does not work. Any help given will be greatly appreciated.