aspose file tools
The moose likes Threads and Synchronization and the fly likes process management Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "process management" Watch "process management" New topic
Author

process management

niall murphy
Greenhorn

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);
p.waitFor();

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 ??

Thanks,
Niall.
Dirk Schreckmann
Sheriff

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.


http://home.arcor.de/hirnstrom/bewerbung
niall murphy
Greenhorn

Joined: Jul 27, 2004
Posts: 2
Hi,

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

N.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: process management
 
Similar Threads
questions about Process and Runtime()
to check and start a process
running java program from a shell script
ftp files to a different server
Running a Java Class from a Unix Shell Script