title: Implement Command History within Java Program?
body: <p>I need some coding advice.  I've written a simple Java program which runs within one of my company's internal websites.  Its a command line program where users enter commands like <code>copy file1 to remote1</code> and <code>compare file1 to file2 archive diff</code> and so on.  My colleagues like it and use it frequently.</p>
  
  <p>The problem is the users' commands tend to be long and repetitive. They have asked me if it is possible to implement a command history in the program.  This way, they can use the up arrow or something to scroll through, edit, and resubmit previous commands.  There's no need to remember commands entered in previous sessions, only the current session.</p>
  
  <p>I've thought about it, and I think I could come up with a solution from scratch... but it would take a few weeks to develop.  I'd much rather implement an available package or module, if one exists and isn't too much trouble.  I know this is an open-ended question, but can anyone recommend such a resource?</p>