Thanks very much to John Sigler and also Casper Gjerris for pointing
out the answer:
  jdk 1.1.8 (and earlier) exhibit this problem when used with Emacs,
  but not when used in a shell directly.

In summary the two possible solutions are:
 * replace code like 
        BufferedReader in =
            new BufferedReader(new InputStreamReader(System.in));
   with
        BufferedReader in =
            new BufferedReader(new InputStreamReader(System.in),1);
   to limit the buffer size to 1 (instead of the default of 8k). 

 * Upgrade to jdk 1.2

I tried both ideas, and they both worked for me.

-- 

  Gilbert Laycock                 email:          [EMAIL PROTECTED]
  Maths and Computer Science,     http://www.mcs.le.ac.uk/~glaycock
  Leicester University            phone:         (+44) 116 252 3902

Reply via email to