Subject: B19: Java readLine not blocking
From: [email-masked] (Kenneth Suter)

28 Jun 1998 14:20:26 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]

Java readLine from BufferedReader does not block for input, at least
under NT 4.0 and Beta 19.  It does however work in the DOS shell.

Here is a sample:

import java.io.*;

class x {
  public static void main(String[] args) {
    BufferedReader in = new BufferedReader ( new
InputStreamReader(System.in) );
    try {
      System.out.println("Enter some text:");
      String s = in.readLine();
      System.out.println("executed readLine()");
      System.out.println(s);
    }
    catch (IOException e) { System.out.println(e); }
  }
}

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".