ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <>
Subject Re: Output Beffuering Question - text-based application execution via ant
Date Sun, 15 Oct 2006 21:41:10 GMT

Ant uses java. Java depends on the underlying OS resources such as Socket I/O handles, File
I/O handles as well as standard handles such as stdin,stderr and stdout
flush the output from the java class to the resource and closing the connection allows the
underlying resource to capture the output and render the output


This e-mail communication and any attachments may contain confidential and privileged information
for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified
that you have received
this communication in error and that any review, disclosure, dissemination, distribution or
copying of it or its 
----- Original Message ----- 
From: "Peter DePasquale" <>
To: <>
Sent: Sunday, October 15, 2006 8:59 AM
Subject: Output Beffuering Question - text-based application execution via ant

> I'm sure this is a common issue, but I can't seem to find an
> answer/explanation for it.
> I'm teaching my students ANT in their programming course.  We use only
> text-based System.out/Scanner( I/O in this course.
> I am finding that in student programs which require user interaction
> (application prompting followed by user input) the prompting seems to be
> buffering until the ant execution task (<java>) is completed.
> Is there a clear, easy way to have user interaction co-exist with ANT such
> that my students can use ant for execution purposes?  I recall a few years
> ago we used to be able to do this, but it seems that the situation is now
> changed.
> There is no problem grabbing the input when the user provides it.  However,
> the problem only seems to be that the output is buffered.  Thus, the
> students don't see the prompts from their program.  If the user knows what
> to enter and when, all will execute perfectly.
> Currently they use a run target in a form similar to:
>  <target name="run" depends="compile" description="execute the
> application">
>    <java classname="Project1"/>
>  </target>
> Thanks.
View raw message