ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baldry, Scot M" <>
Subject Ant 1.4.1 Bug???
Date Wed, 19 Jun 2002 15:36:55 GMT

I am just trying to convert some custom tasks written under ANT 1.3 to ANT
1.4.1 and have noticed a really strange problem - has anyone seen anything
similar? I am running on Win NT 4.0 with JDK 1.3.1_02.

I have the following snippet of code inside one of my custom tasks - the
purpose is to prompt the user for a comment that is later included in a jar
file for the package they are invoking the task on:

    public String getPackageComment() {
        String comment = null;
        BufferedReader input = new BufferedReader(new

        try {
            while ((comment == null) ||
                   (comment.trim().equals(""))) {

                System.out.print("Enter Comment : ");
                comment = input.readLine();
        catch (IOException ioe) {
            throw new BuildException("Unexpected error occurred");

        return comment;

What happens is that the output caused by the print statement is not seen on
the console until a key is pressed. However, if I change the
System.out.print statement to be System.out.println everything works exactly
as expected. I am confused as to why this is happening since the code works
when not run as an ANT task and it also work in ANT 1.3.

Anyone know what could be causing this?


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

View raw message