Ok i'll try it out and mail you.
Thanks,
Eusabia
On Tue, May 6, 2008 at 3:27 PM, Matthias Kramm <[EMAIL PROTECTED]> wrote:
> On Tue, May 06, 2008 at 12:17:25PM +0530, eusabia roseline <
> [EMAIL PROTECTED]> wrote:
> > in = new BufferedReader(new
> > InputStreamReader(p.getErrorStream()));
>
> Please read out p.getInputStream(), too, and do the waitFor() *after*
> reading out the streams.
>
> Something like this:
>
> BufferedReader stdInput = new BufferedReader(new
> InputStreamReader(p.getInputStream()));
> BufferedReader stdError = new BufferedReader(new
> InputStreamReader(p.getErrorStream()));
> while (true) {
> String s1 = stdInput.readLine();
> String s2 = stdError.readLine();
> if(s1 != null) {
> System.out.println(s1);
> } else if(s2 != null) {
> System.out.println(s2);
> } else {
> break;
> }
> }
> p.waitFor();
>
> Greetings
>
> Matthias
>
>
>
>
>
>
>