Text navigation in Java – JDB does not work in bash

When I run JDB in Bash, the arrow keys generate strange garbage:

up: ^[[A
down: ^[[B
left: ^[[D
right: ^[[C

So I can't use command history or correct spelling errors because I can't navigate the text at all, which is very annoying Is there a way to solve this problem?

Java version information:

"1.6.0_24"                                                                             
OpenJDK Runtime Environment (IcedTea6 1.11.5) (fedora-68.1.11.5.fc16-x86_64)                        
OpenJDK 64-Bit Server VM (build 20.0-b12,mixed mode)

Bash version information:

GNU bash,version 4.2.28(1)-release (x86_64-redhat-linux-gnu)

Solution

Have you ever tried running jline with JDB?

Jline provides you with cursor interaction and command line history

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>