title: Java command line "shell" with auto-complete
body: <p>I need to create a Java command line to that will be invoked remotely on a server. It will need to:</p>
  
  <ul>
  <li>Read "lines" of text from the user.</li>
  <li>Recognise if the user presses the "tab" key to facilitate auto-complete.</li>
  <li>Recognise if the user presses the "up/down" keys for history.</li>
  </ul>
  
  <p>Before I go off and roll my own, Is anyone aware of a Java library that might facilitate all or part of this?</p>
  
  <p><em>i.e.</em> From the command line in ssh it might look like this:</p>
  
  <blockquote>
    <p>bob> java -jar MyTool.jar   </p>
    
    <p>MyTool Started.<br>
    Please enter command:  </p>
    
    <p>> server1 startup<br>
    server starting...<br>
    server started  </p>
    
    <p>> server2 load accounts<br>
    Done  </p>
    
    <p>> server3 shutdown<br>
    Complete  </p>
    
    <p>>quit</p>
  </blockquote>