> On Jan 8, 2008 5:54 AM, John Hendrie <[EMAIL PROTECTED]> wrote: > > public class Main { > > public static void main(String[] args) { > > System.out.print("Hello"); [...] > > } > > } > > > > Ant doesn't output "Hello", I have to exit the Java app for > it to appear. > > Any ideas on how I can solve this? > > In Ant, the default System.out stream is replaced by an Ant-controlled > stream to be able to capture output from all code run within Ant, and > prefix the task name for example. Conor as a good write up on this > somewhere, but basically Ant's logging system buffers all output by > line, and since you use print instead of println, there's no carriage > return that would flush Ant's buffer. The flush on System.out in your > code has no effect. You can test this by issuing a println instead. > > I don't think there's a way around this without some tricky coding, > although it could also be that no one thought this was worth the dev > effort and possible struggle to get it accepted to "un-line-buffer" > the logging sub-system... --DD
Good catch, Dominique. Jan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]