Creating Java Command Line Applications using jLine

Most common way of writing a command line application in java is to use BufferedReader to read user input. But if you want more features like tab completion, you have to write code to handle it from the scratch in BufferedReader method.

There is a nice library called jLine which can be used to write nice CLI apps without much effort. It has out of the box support for;

  • Command History 
  • Tab completion 
  • Line editing 
  • Custom Key Bindings 
  • Character masking
I've written simple sample application on how to use jLine. You can check that out in github

Tribune to Heros

Tribune to Heros
We will never forget the sacrifices you made to protect our country....


Get Google Toolbar Button

Enter your email address:

Delivered by FeedBurner