[6268] in java-interest

home help back first fref pref prev next nref lref last post

exec() problems

daemon@ATHENA.MIT.EDU (Rick Fincher)
Wed Mar 27 01:45:45 1996

Date:         Wed, 20 Mar 1996 19:02:24 -0500
Reply-To: Java Interest <JAVA-INTEREST@JAVASOFT.COM>
From: Rick Fincher <rnf@SPITFIRE.TBIRD.COM>
To: Multiple recipients of list JAVA-INTEREST
              <JAVA-INTEREST@JAVASOFT.COM>

Hi,

I'm having problems trying to use exec() in java.lang.Runtime in a Java
application (so paranoia settings shouldn't be a problem). I'm runnung JDK 1.0
under Solaris 2.5. I traced the origin of the problem back to the call:

Runtime run = Runtime.getRuntime();
Process myProcess = run.exec("uname");

When I run this I get:

pid 28209 status 6
Received sigchild for 28209 exit=6

/usr/include/sys/errno.h lists the following for error 6:

#define ENXIO   6       /* No such device or address            */

What am I doing wrong? I actually want to run some shell scripts but I tried
'uname' because it is a system call, in case java's exec() is limited to that.

I'd like to use 'myProcess' to get an input stream so I can get the results back
from the call.

Thanks in advance for any help.

Rick
rnf@spitfire.tbird.com

-----
This message has been forwarded via the JAVA-INTEREST
mailing list.  In order to unsubscribe from this list, send a message to
listserv@javasoft.com with the command 'signoff JAVA-INTEREST' in
the message body (not in the subject line).

-----
This message has been forwarded via the JAVA-INTEREST
mailing list.  In order to unsubscribe from this list, send a message to
listserv@javasoft.com with the command 'signoff JAVA-INTEREST' in
the message body (not in the subject line).

home help back first fref pref prev next nref lref last post