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: 6672641
Votes 0
Synopsis Console enhancements to support command-line interfaces
Category java:classes_io
Reported Against
Release Fixed
State 3-Accepted, request for enhancement
Priority: 5-Very Low
Related Bugs
Submit Date 07-MAR-2008
Description
A DESCRIPTION OF THE REQUEST :
java.io.Console needs to have many methods added so that it can support the building of command line interfaces.

Here are some desperately needed methods:

1) a method to return the number of charactersc in one console line

2) a method to clear the current line of output and have the cursor left at the start (left) of the line

JUSTIFICATION :
1) is needed if you want to format stuff like tables for console output: you need to know how wide it is.

2) is needed because supplying a \r char has at least 2 defects:

a) may only work on windows and unix, but possibly not on some other OSes which treat it as a \n

b) even on those platofrms in which it works, it does not actually clear the line, but merely moves the cursor back to the start; any previous chars are left there.

And why do I need a command line interface?  Because sometimes for rapid development this is the fastest way to get output and I really do not want to have to spend the time to code up a GUI.

Also, I do a lot of work running java programs on advanced remote unix servers, and I am using an ssh terminal to tap into the server, so GUIs are impossible anyways.
Posted Date : 2008-03-07 12:02:41.0
Work Around
N/A
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang