0

I want to develop a java cli with jline..I get different Jline version from Internet, but I don't know the difference between them..

My OS is WINDOWS XP SP2.

In Jline09.9 and Jline1.0, it also don't support clean screen. How to config keybind to support clean screen??

The source code WindowsTerminal.java

 /**
 * Windows doesn't support ANSI codes by default; disable them.
 */
public boolean isANSISupported() {
    return false;
}

In jLine0.9.9 and Jline1.0 , clean screen don't work.. https://i.stack.imgur.com/2m71z.jpg

In Jline2.x, it support clean screen, but console appear gibberish when I use array key UP/DOWN/LEFT/RIGHT , INSERT, DELETE, END..

Bad code and strange Character in Jline 2.6 and Jline2.9 When type array key or DELETE,HOME,INSERT key https://i.stack.imgur.com/5A8d2.jpg

I don't know how to config keybind in Jline1.x and Jline2.x through keybinds.properties. And How to config the keybinds.properties ? How to use it??

Could you give some advice or example?

  • might be a bit offtopic, just related to versioning. but for libraries I use, I preffer to use the latest version available, so that I won't get stuck with some anoying bug in a version noone uses/maintains any more. therefor I'd stick with 2.9 (as the maven repo search reveals: http://mvnrepository.com/artifact/jline/jline). then the question is if the library is capable of the functionality you expect from it or if there exists any other alternative that would support it. – Peter Butkovic Jan 28 '13 at 18:56
  • Thank you for your replay, Peter. Could you give me examples about configing keybinding.. – paladin1988 Jan 29 '13 at 03:23
  • well, here it usually works the other way, you should show us what you have done and describe questions/problems you face with it. to some extent you provided the problems, however you didn't share the code, so maybe it's the right time to update your question with your code sniplets – Peter Butkovic Jan 29 '13 at 06:19

1 Answers1

0

Did you install AnsiConsole? This is needed to render the "gibberish" escape codes.

AnsiConsole.systemInstall();

should do it for you.

Barry McGillin
  • 465
  • 5
  • 11