Skip to main content

How to get a realtime output of a process when it call using Runtime.exec()

No replies
rijeshpp
Offline
Joined: 2007-12-03

Hi,

How to get a real-time output (STDOUT) of a process when it execute using Runtime.exec()? We have developed java web based application deployed on WAS running on AIX server which calls a script deploy.sh using Runtime.exec() in servlet. Through the GUI screen when clicking on submit it invoke the script on the AIX server where application running. Currently it gives the STDOUT of the script on the GUI at the end of the script execution. Since the script execution of deploy.sh takes a long time (3-5 minutes), and the output (script output) gives only after 3-5 minutes user cannot identify what