commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scovetta, Michael V" <Michael.Scove...@ca.com>
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");
b.run();
String output = b.getOuput();


Michael Scovetta
Computer Associates
Senior Application Developer


-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Lukas Bradley
Sent: Wednesday, March 30, 2005 11:54 AM
To: commons-user@jakarta.apache.org
Subject: Re: Runtime.exec() Utilities?

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

This looks like it might be perfect:

org.apache.tools.ant.taskdefs.Execute
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: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message