We don't necessarily need to use jline for this, there's an utility called rlwrap that provides GNU Readline functionality for the wrapped application. I'm not sure about the availablity of rlwrap on windows, though.