I have a C#.Net console app code that transfers files between linux and windows ftp servers.
The code's behavior is that I automatically open a console to display status of the file transfer. While transferring files to and from the windows server, I need to display an indicator that the file transfer is on-going (using symbols that look like they are moving or turning) . These symbols are as follows : "|" --> "/" --> "-" --> "\" --> "|"
There had been no problem displaying the said "indicator/symbols" in C#.Net using the following codes :
ProcessStartInfo PSI = new ProcessStartInfo("CMD.exe", "/C [here is the call to psftp / ftp scripts]");
String SymbolChar = "|";
Process proc = Process.Start(PSI);
I am not aware of any way you can provide an animation in the process window from Java whilst waiting for the Process to complete. You could, however, provide your own GUI progress window.
You can wait for a process to end by calling it's waitFor() method.
You can poll the process until it has completed by repeatedly calling readLine() on the input stream until it returns null. Note this will block awaiting output from the process.