This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
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://aspose.com/file-tools
 
subject: process management
 
Similar Threads
Running a Java Class from a Unix Shell Script
to check and start a process
questions about Process and Runtime()
running java program from a shell script
ftp files to a different server