The Artima Developer Community
Sponsored Link

how to send Send output to a process launched by Runtime class

Advertisement

Advertisement

This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

how to send Send output to a process launched by Runtime class

Posted by Bharath reddy A on 30 Jan 1999, 5:21 AM

my problem is using the Runtime's exec method i've launched a code like this

Process p = Runtime.getRuntime().exec("java test");
- in a abc.java program -

in that particular 'test.java' which i am launching using the Runtime's exec method, i have written one
----
System.out.println("hello world");
System.in.read(byteArray);
----
I was able to retrieve
the 'hello world' string using an inputstream

but i was unable to send some string data to that process which is hanging there at system.in.read?

How to solve this?



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us