Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4530318

RFE: Need beefed up System.in in order to write console interfaces

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.1
    • core-libs
    • generic
    • generic



      Name: ddT132432 Date: 11/21/2001


      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

      It is IMPOSSIBLE to write a decent command line interface program (a console
      based application) in Java!

      This is entirely due to the following defects of System.in:
      --it does not report individual key events as they happen; rather, you must
      wait for the user to press enter, and then all the keys pressed since the last
      enter are made available to System.in
      --it does not report non-ascii key events (e.g. arrow keys, or control
      modifiers)

      It would also be nice if you had some way to erase previous chars that were
      written by System.out

      Before writing you guys, I first started a thread on one of the JDC forums.
      All the guys who wrote back confirmed what I wrote above; see their comments
      for yourself:

          http://forum.java.sun.com/thread.jsp?forum=4&thread=192144

      (If that URL does not work, look for the topic "How can detect Arrow keys from
      a console app?" that was submitted on Nov. 17th the the Advanced Language
      Topics list.)
      (Review ID: 136034)
      ======================================================================

            mr Mark Reinhold
            ddressersunw Daniel Dresser (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: