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!

java runtime exec() problem

Status
Not open for further replies.

oceandeep

IS-IT--Management
Jul 6, 2000
69
GR
Dear All,

I tried to use runtime exec to redirect my script's output to a file for further processing. But seems my wholeday's work has no avail.
The programme was developped on Solaris 8.
The command I wanted to excute was like: /path/path/myScript > /path/path/file.conf
It always returned error code 0 but I couldn't see file was generated.
Can anybody please help me out, or give me some enlightments?
Thanks!

OceanDeep
 
Trying to capture output by redirection from an exec call doesn't work on the windows platform either.

The Runtime.exec() method returns a Process object. The Process object has getErrorStream() and getOutputStream() methods you can use to capture the output.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top