Redirect ProcessBuilder output to Eclipse Console [message #1542464] |
Fri, 02 January 2015 17:22 |
Radek Martínek Messages: 1 Registered: January 2013 |
Junior Member |
|
|
Hi all,
I am working on a simple plugin, which uses ProcessBuilder class to run batch file. This batch file calls another applications. I would like to catch the text generated when this batch script is running and redirect it to Eclipse Console.
The best result, which I was able to implement, was with implemented Stream Gobbler, which runs in different thread and use InputStream reader from Process created when start function is called on ProcessBuilder. But even with this Stream Gobbler the text is written to conslole only when the batch script ends. I am not able to catch the batch script output and print it into Eclipse Console in real-time.
But if you use Make Target functionality, which is integrated directly in Eclipse and run a batch file through this, the output from batch file is in real-time redirected to Eclipse Console. So there must be a way how to do that also in the plugin.
Thanks for replies.
|
|
|
Powered by
FUDForum. Page generated in 0.02823 seconds