libreadline-java is a port of GNU Readline for Java. Or, to be more precise, it is a JNI-wrapper to Readline.