ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rich Wagner" <>
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" <>
>Reply-To: "Ant Users List" <>
>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?
>Check out the new MSN 9 Dial-up  fast & reliable Internet access with 
>prime features!
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Learn how to choose, serve, and enjoy wine at Wine @ MSN.

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

View raw message