ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rich Wagner" <richmwag...@hotmail.com>
Subject RE: How grab output to "System.out"?
Date Fri, 30 Jan 2004 00:15:56 GMT
Have you thought about:

(a) Writing a "wrapper" class that...
(b) has a "public static void main (String[] args) { ... }" method, which...
(c) includes a call to "System.setOut", and subsequently...
(d) invokes Ant's "main" method ?

If your "programmatic Ant invocation" is currently a direct call to Ant's 
"main", then you'd change that to invoke your wrapper instead...

Just a suggestion...

-- Rich Wagner


>From: "Robert Paris" <rpjava@hotmail.com>
>Reply-To: "Ant Users List" <user@ant.apache.org>
>To: user@ant.apache.org
>Subject: How grab output to "System.out"?
>Date: Fri, 30 Jan 2004 00:03:37 +0000
>
>I am working with Ant programatically and I need to be able to grab the 
>output (outputstream) from programs that run in Ant. I know Ant does this 
>as when my program does:
>     System.out.println( "test" );
>Ant actually prints:
>     [Java] test
>
>Does anyone know what class/method I need to use to do this?
>
>Thanks!
>
>_________________________________________________________________
>Check out the new MSN 9 Dial-up  fast & reliable Internet access with 
>prime features! http://join.msn.com/?pgmarket=en-us&page=dialup/home&ST=1
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>

_________________________________________________________________
Learn how to choose, serve, and enjoy wine at Wine @ MSN. 
http://wine.msn.com/


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


Mime
View raw message