commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scovetta, Michael V" <>
Subject RE: Re: Runtime.exec() Utilities?
Date Wed, 30 Mar 2005 17:02:25 GMT
It'd probably be pretty easy to wrap the ant tools with a simpler
interface. It'd be nice to say:

Batch b = new Batch();
b.add("dir > bar");
b.add("cat bar | grep myfile");;
String output = b.getOuput();

Michael Scovetta
Computer Associates
Senior Application Developer

-----Original Message-----
From: news [] On Behalf Of Lukas Bradley
Sent: Wednesday, March 30, 2005 11:54 AM
Subject: Re: Runtime.exec() Utilities?

> ANT gives you a selection of well-tested tasks of all kinds,
> and system-independent. Give it a try. HTH,

This looks like it might be perfect:
Execute(ExecuteStreamHandler streamHandler, ExecuteWatchdog watchdog)

However, I don't see a stream handler that can batch input and output. 
In other words, I have a list of commands I want to send, and I just 
want all the output retrieved.   I was hoping one might be available, so

I don't have to write my own in/out/err stream handlers.

Do you know of any?

I'm going to post a similar question to the ANT list.  I will repost the

answer back here if a solution is received.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message