ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: Javac verbose output in Ant source code
Date Fri, 25 Jul 2003 07:24:06 GMT
On Fri, 25 Jul 2003 11:06 am, Grant Mc Auley wrote:
> Hello,
> My Java program uses Ant source code to verbosely compile source files:
>     Javac javac = new Javac();
>     javac.setVerbose(true);
> I have implemented a BuildListener that handles Ant log messages and
> prints them in a JTextArea.  I want to capture the verbose compiler
> messages (which are sent to stderr I think).
> Any ideas would be appreciated.

If you run the javac task in-VM, you will need to redirect System.out and 
System.err such that output produced by javac is made available either to the 
javac task or directly into your application. In Ant this is handled by the 
DemuxOutputStream. This does a lot more than you would need to including 
separating output onto the appropriate task based on thread usage. The 
DemuxOutputStream forwards input into the Project which then gives it to 
appropriate task. You can probably short circuit some of that or simply use 
the DemuxOuptutStream in your app.


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

View raw message