File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Threads and Synchronization and the fly likes process management Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "process management" Watch "process management" New topic

process management

niall murphy

Joined: Jul 27, 2004
Posts: 2
Hi all,

I'm running a script on UNIX from my java application using

Process p = Runtime.getRuntime().exec("/bin/sh " + cmdfilename);

However it doesn't always run successfully so I want to be able to trace
an output /errors thrown from the process ... how should I go about that ?

On a separate note ... the script I'm running is to perform batch ftp operations. Does anyone know of any good java ftp resources/libraries or other ftp script resources ??

Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
niall niall,

Welcome to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

Is your name really "niall niall"?

Thanks Pardner! Hope to see you 'round the Ranch!

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

google for 'javaworld pitfall runtime' - there is an excellent and detailed article.
niall murphy

Joined: Jul 27, 2004
Posts: 2

that business with the 'niall niall' name was unintenional !
thanks for the link to the javaworld article

I agree. Here's the link:
subject: process management
It's not a secret anymore!