Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4530318
Votes 7
Synopsis RFE: Need beefed up System.in in order to write console interfaces
Category java:classes_lang
Reported Against 1.3.1
Release Fixed
State 11-Closed, duplicate of 4050435, request for enhancement
Priority: 4-Low
Related Bugs 4050435
Submit Date 21-NOV-2001
Description




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) 
======================================================================
Work Around




None
======================================================================
Evaluation
These requirements will be considered as input to 4050435.

--   xxxxx@xxxxx   2002/12/16
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang