ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <GGreg...@seagullsoftware.com>
Subject RE: Getting Ant to print the arguments of System.out.print() calls
Date Tue, 08 Jan 2008 16:12:49 GMT
You could call [1] the Ant task "echo" [2] from your Java code.

Gary

[1] http://ant.apache.org/manual/antexternal.html
[2] http://ant.apache.org/manual/CoreTasks/echo.html

> -----Original Message-----
> From: John Hendrie [mailto:john.hendrie@gmail.com]
> Sent: Tuesday, January 08, 2008 3:55 AM
> To: user@ant.apache.org
> Subject: Getting Ant to print the arguments of System.out.print() calls
>
> Hi,
>
> I'm sorry if this is a really obvious question but I'm having trouble
> getting Ant to print System.out.print() calls. The archive throws up a few
> related posts but with no answers.
>
> I have a simple example:
>
> public class Main {
>
>     public static void main(String[] args) {
>         System.out.print("Hello");
>         System.out.flush();
>
>         while (true) {
>             try {
>                 Thread.sleep(1000);
>             } catch (InterruptedException ex) {
>                 ex.printStackTrace();
>             }
>         }
>     }
> }
>
> Ant doesn't output "Hello", I have to exit the Java app for it to appear.
> Any ideas on how I can solve this?
>
> Thanks!
> John

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


Mime
View raw message