Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

questions regarding methods of class 'Process'

Status
Not open for further replies.

frag

Programmer
Dec 7, 2000
321
GB
Hi!

What is the difference between Process.getOutputStream() and Process.getErrorStream()?

If I call a shellscript and this script has a 'usage' information which is display when calling it with the wrong parameters will I get this output with getOutputStream()?
What will getErrorStream() return? Things like 'permission denied', 'can't find file or folder', etc.?

Cheers

frag

p.s. this is for a solaris environment

patrick.metz@epost.de
 
Hullo!

Lets see if I can take a stab at this one. The Process java class has three methods that sort of apply to your question - i think. Process.getOutputStream(), Process.getInputStream(), and process.getErrorStream(). These methods will allow you to control the flow of stdout, stdin, and stderr, respectfully. take a look at the man page for either of these processes to see the difference.

here is a link if you can't get to a man page:


hope this helps,

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top