Getting output from an unterminated process.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   B_C
Posted On:   Monday, September 24, 2001 08:18 AM

Hi, I am using the runtime.exec() method to launch a process. I am using the process's getInputStream() method to get the input stream of this process. The process that i am launching is a small server, and so once started runs for the duration of my java program (it is killed when the java application is exited). The problem that i am experiencing is that I want to read the output from the server at various stages in the execution of the application. I use the process's input stream for this purpose. But I can't get any output from the server unless i explicitly terminate the process (which i don't want to do).    More>>

Hi,



I am using the runtime.exec() method to launch a process. I am using the process's

getInputStream() method to get the input stream of this process.



The process that i am launching is a small server, and so once started runs for the duration

of my java program (it is killed when the java application is exited).



The problem that i am experiencing is that I want to read the output from the server at

various stages in the execution of the application. I use the process's input stream for

this purpose. But I can't get any output from the server unless i explicitly terminate the

process (which i don't want to do).



So in a nutshell is it possible to get the output of a process (via the inputStream) while

that process is still executing?



Thanks.

   <<Less

Re: Getting output from an unterminated process.

Posted By:   Paragi_Shah  
Posted On:   Thursday, February 21, 2002 10:09 AM

hi,
I am facing the exact same problem... were u able to resolve it?

thanks
Paragi
About | Sitemap | Contact