ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52854] New: Strange entering behaviour in apache-ant 1.6.3 when we type a parameter from console
Date Thu, 08 Mar 2012 07:19:03 GMT

             Bug #: 52854
           Summary: Strange entering behaviour in apache-ant 1.6.3 when we
                    type a parameter from console
           Product: Ant
           Version: unspecified
          Platform: PC
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Core tasks
    Classification: Unclassified

Reading / introducing a parameter from console has a strange behaviour: 
the pressed characters (keys) do not appear on the monitor. They are 
visible only after the Enter key is pressed. In apache-ant 1.8.1 it 
was O.K., while in apache-ant 1.8.2 it does not work.

(I use Windows 7 (64), jdk1.7.0_03)

Test example
package hello;
import java.util.Scanner;

public class HelloWorld{
  public static void main(String[] args){
    Scanner scanner=new Scanner(;
    System.out.println("Enter your name");
    String response=sayHello(name);

  private static String sayHello(String name){
    return "Hello "+name+" !";

<project name="hello" default="Run" basedir=".">
  <property name="build.dir" location="build"/>
  <property name="src" location="src" />

  <path id="myclasspath">
    <pathelement path="${build.dir}" /> 

  <target name="init">
    <delete dir="${build.dir}"/>
    <mkdir dir="${build.dir}"/>

  <target name="Compile" depends="init" >
    <javac srcdir="${src}" destdir="${build.dir}" 
      includeantruntime="false" classpathref="myclasspath"/>

  <target name="Run" depends="Compile"> 
    <java classname="hello.HelloWorld" classpathref="myclasspath" fork="true"/>

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message