https://issues.apache.org/bugzilla/show_bug.cgi?id=52854
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
AssignedTo: [email protected]
ReportedBy: [email protected]
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.in);
System.out.println("Enter your name");
String name=scanner.next();
String response=sayHello(name);
System.out.println(response);
}
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}" />
</path>
<target name="init">
<delete dir="${build.dir}"/>
<mkdir dir="${build.dir}"/>
</target>
<target name="Compile" depends="init" >
<javac srcdir="${src}" destdir="${build.dir}"
includeantruntime="false" classpathref="myclasspath"/>
</target>
<target name="Run" depends="Compile">
<java classname="hello.HelloWorld" classpathref="myclasspath" fork="true"/>
</target>
</project>
===================================================
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.