I am working with one cmd like executable and source code of that is not available.
Executable is having multiple command sequence to be entered before it exit. Each command takes random time from 1 sec to 1 min.
I tried with Java's Process builder
and runtime
but I am getting output only after program completely exits from execution. Also, I am not able to insert any command to that executable via BufferedWriter
. So my question is how to get output of executable while it is still running
Quenstions referred: Executing an EXE from Java and getting input and output from EXE
java runtime.getruntime() getting output from executing a command line program etc.