United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4530318 : RFE: Need beefed up System.in in order to write console interfaces

Details
Type:
Enhancement
Submit Date:
2001-11-21
Status:
Closed
Updated Date:
2002-12-16
Project Name:
JDK
Resolved Date:
2002-12-16
Component:
core-libs
OS:
generic
Sub-Component:
java.lang
CPU:
generic
Priority:
P4
Resolution:
Duplicate
Affected Versions:
1.3.1
Fixed Versions:

Related Reports
Duplicate:

Sub Tasks

Description

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

                                    

Comments
WORK AROUND



Name: ddT132432			Date: 11/21/2001


None
======================================================================
                                     
2004-06-11
EVALUATION

These requirements will be considered as input to 4050435.

-- ###@###.### 2002/12/16
                                     
0182-10-12



Hardware and Software, Engineered to Work Together