Name: dbT83986 Date: 02/27/99
This bug is real easy to reproduce. If you run this code with
JDK1.1 under NT you will see letters as you type. The letters
will show up when you hit Return. If you run the same code
under NT with JDK1.2 you will not see letters as you type
them. This same code works just fine under solaris
with JDK1.1 or JDK1.2. Please fix this bug, it is a show
stopper!
public class echo {
public static void main(String[] argv) throws Exception {
System.out.println("Please begin typing");
while (true) {
int avail = System.in.available();
if (avail == 0) {
Thread.currentThread().sleep(100);
} else {
byte[] buff = new byte[avail];
System.in.read(buff);
//echo back what was just typed
System.out.println("-----ECHO BEGIN-----");
System.out.write(buff);
System.out.println("-----ECHO END-----");
}
}
}
}
thanks
Mo DeJong
(Review ID: 52296)
======================================================================