It's easy to launch some program and then - when this program finishes - get a result (stdout, for instance). I use the following code:
But how can i get stream contents in real time?
Being precise, i have a program that prints a line every n seconds; and i want to launch it from
java code and every n seconds process the line it prints.