Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JLine only works from IDEA

Tags:

java

jline

I have no problem using jline when the code is run within idea. Running with a bat file, the edit characters are not being sent to the terminal.

java -classpath ..\JActor\target\classes;..\JID\target\classes;target\classes;..\slf4j-api-1.7.2.jar;..\slf4j-simple-1.7.2.jar;..\apache-sshd-0.8.0\lib\sshd-core-0.8.0.jar;..\apache-sshd-0.8.0\lib\mina-core-2.0.5.jar;..\apache-sshd-0.8.0\lib\bcprov-jdk15-140.jar;..\jline-2.9.jar;..\joda-time-2.1.jar org.agilewiki.jasocket.sshd.SSHServer %1%

I checked the jline jar file and it contains the fusesource code for jansi and hawtjni.

like image 481
William La Forge Avatar asked Jan 19 '13 14:01

William La Forge


1 Answers

Turns out, the Terminal used under IDEA and the dos box were different. Forcing the use of the IDEA terminal in all cases didn't work, but this did:

    consoleReader = new ConsoleReader(in, out, new TerminalSupport(true) {});
like image 106
William La Forge Avatar answered Sep 21 '22 10:09

William La Forge