JLine is a Java library for handling console input.
It is similar in functionality to BSD editline and GNU readline.
People familiar with the readline/editline capabilities for modern shells (such as bash and tcsh) will find most of the command editing features of JLine to be familiar.