6

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.

Jacob Schoen
  • 14,034
  • 15
  • 82
  • 102

1 Answers1

3

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) {});
  • 1
    This same issue occurs when running from within Eclipse, and then later from within Tomcat. The given fix works, although I still don't understand why even though I've been looking through the JLine2 code. – kaliatech May 20 '13 at 17:08