In the Beginning ... Was the Command Line
In Neal Stephensen's 'In the Beginning ... Was the Command Line', Neal argues that the command-line interface "opens a much more direct and explicit channel from user to machine than the GUI". I agree, for most tasks, I find that a 'bash' shell, a text editor, and the suite of Unix commands is the most efficient set of tools. But ... don't try to write a command shell in Java!
In Java, it is not possible to perform raw console I/O, only line buffered I/O is possible. The user has to hit [return] before your app sees what the user typed. This means that interactive command-line editing, password input (where the characters typed are not echoed) or curses style apps are not possible in Java. Without this capability it is impossible to write good interactive text apps. You could not write bash in Java, you could not write a non-GUI vi or emacs.
Bug 4050435 "Improved interactive console I/O (password prompting, line editing)" is number 11 on the list of Top RFEs at the Java Bug Parade. This RFE is to provide an API to give Java the ability to put the console in raw mode, to allow for character by character input and output to the terminal. It seems like simple, almost trivial functionality to add to the Java platform, and it would allow the writing of a whole class of applications. However, given that the RFE has been outstanding for Seven Years, it is unlikely that we'll be seeing a Java command line in the near future. But you can help. This RFE only needs about 25 more votes to move it into the top 10 RFEs. If you think Java console apps are important, add your vote to have this RFE fixed. Seven years is a long time to wait for such an important thing.
Update - 12 ours later only 14 votes more to go!
Posted by Sitchai on June 16, 2004 at 09:09 AM EDT #
Posted by Paul on June 16, 2004 at 09:44 AM EDT #
Posted by Doug on June 16, 2004 at 12:57 PM EDT #
Posted by Val on June 17, 2004 at 02:25 AM EDT #
Posted by Paul on June 17, 2004 at 06:11 AM EDT #
Posted by Val on June 17, 2004 at 09:42 AM EDT #
Posted by Paul on June 18, 2004 at 07:20 AM EDT #