On Sat, Jul 28, 2001 at 05:57:25AM -0700, bhuvaneswari thirumoorthy wrote:
> hi,
> I am using JDK1.2.2 with RedHat Linux6.2.2. I would
> like to run an executable from a java program.For eg:
> I am using the following command:
>
> Runtime r=Runtime.getRuntime();
> r.exec("sh /home/test/./javacon");
>
> For this code, no error is coming. And while running,
> it ends up with a silence. Nothing happens. Please
> help me. Thanks in advance.
The output and error output are sent to pipes that you have to read:
Process p = r.exec("sh /home/test/./javacon");
InputStream is = p.getInputStream();
InputStream eis = p.getErrorStream();
You need to read the is and eis streams to get the standard and error
output from the process.
Nathan
>
> =====
> "My grandfather once told me that there are two kinds of people: those who work and
>those who take the credit.He told me to try to be in the first group;there was less
>competition there"
> -Indira Gandhi
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
--
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]