Posted By:
Dermot_Hennessy
Posted On:
Friday, August 10, 2001 02:12 AM
For starters, I am assuming that by 'Java command line', you mean that you have devised a Java command line interpreter of some sort.
That assumption made, you will probably need a thread to maintain a list of the last entered commands, and to listen for the up arrow key and other special keys being pressed. There is a java.awt.Event variable which represents the up arrow key having been pressed .
When you receive an up arrow notification, simply unravel your list of previous commands.
Come to think of it you possibly don't need a separate thread...
Dermot