87 questions
0
votes
0
answers
22
views
How to disable logging in jline3?
I need to disable logging there
I tried creating logback.xml
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<...
0
votes
0
answers
92
views
Up arrow based command history in console input (Java)
I am currently using:
Scanner scanner = new Scanner(System.in);
To get user input in Java, but I want to add a way for user to use previous command easily. If users presses UP key it should show ...
5
votes
0
answers
656
views
Spring Shell integration with IntelliJ console
I'm using Spring-Shell v2.1.4 with IntelliJ Utlimate IDE. If I use a Flow component in a shell method I find that it does not work when launched within IntelliJ but works fine from a plain Bash ...
1
vote
2
answers
1k
views
Spring Shell components don't show up
I'm trying to use the Spring Shell built-in components StringInput, PathInput, ConfirmationInput, SingleSelect and MultiSelect. Each time I try and use one of these by executing the run() method they ...
0
votes
1
answer
94
views
Why does jline's TerminalBuilder not accept function call?
Please dont ban me for this question, i am a noob and i have googled this for hours now.
To make a console based Snake Game, i plan to use the jline Libary.
However, when i try to call "Terminal&...
0
votes
1
answer
249
views
Jline with completion candidates having space giving unexpected output
I am using Jline 3.21.0 and trying to run a simple test with reference from
https://github.com/jline/jline3/blob/master/reader/src/test/java/org/jline/reader/completer/StringsCompleterTest.java
Below ...
0
votes
1
answer
201
views
Sending commands to external program using JLine reader not working
I have a program that runs another Java program and sends commands to the program but it doesnt detect the commands. The program I am sending to the commands to uses JLine so I think that is the ...
0
votes
1
answer
325
views
Minecraft like console in java
So I am working on a http server app thing, and I need to make a inbuilt shell for some stuff (like minecraft). I tried a lot with jline but cannot get a proper prompt without the logs messing up the ...
0
votes
1
answer
650
views
Running jar results in ClassNotFoundException (Gradle)
So I'm relatively inexperienced on how gradle works, and I need some help getting my jar working. My application generates some files through the terminal. However, when I try to run the jar, it gives ...
4
votes
0
answers
231
views
How to set lineeditor to vi-mode in JShell
How to set lineeditor to vi-mode in JShell?
The setting set editing-mode vi is in both $HOME/.inputrc and $HOME/.jline.rc, but it seems like Jshell does not respect any of them.
1
vote
2
answers
2k
views
jmxterm: "Unable to create a system terminal" inside Docker container
I have a Docker image which contains JRE, some Java web application and jmxterm. The latter is used for running some ad-hoc administrative tasks. The image is used on the CentOS 7 server with Docker 1....
1
vote
1
answer
252
views
JLine not showing chars after using readChar()
I tried to make simple keyboard tester in java so i use Jline for reading chars without pressing ENTER, but when i try to read line from Console it's not showing chars. I tried to use diffrent version ...
0
votes
1
answer
685
views
jline problems with escape character in completion
I am working on a project with jline version3 in java but in completion, I need to have "else if" but it puts \ to escape space as an escape character and I don't have any escape character ...
0
votes
2
answers
233
views
Single title in JLine 3 help output
How do I customize the help command in JLine 3? The help in my JLine 3 shell sample displays as:
manager> help
System:
exit exit from app/script
help command help
Builtins:
...
0
votes
1
answer
1k
views
How to run interactive bash using Java ProcessBuilder API?
I am trying to start bash using java ProcessBuilder API:
code:
public class BashExecutor {
public void executeCommand(String[] command, Consumer<String> consumer) {
ProcessBuilder ...
1
vote
1
answer
202
views
Why does my command prompt show no characters entered?
When I execute my program and I read with either jline's ConsoleReader or with the BufferedReader the text I enter is entered but not shown. For example I type asd, my Console does not show asd, but ...
0
votes
0
answers
358
views
Fuse dead after restart
I rebuilt my docker with Fuse (Red Hat Fuse (7.0.0.fuse-000191-redhat-1)
) on Centos 7, and everything is broken now. I didn't change anything.
Could a yum update cause this?
Exception caught while ...
0
votes
1
answer
295
views
JLine autocomplete not showing and running onComplete after pressing enter
For some reason, my multithreaded netty server won't work with autocomplete on Windows to be specific (in my original testing linux worked fine)
I found terminal console appender and jansi to be "...
3
votes
0
answers
601
views
JLine system terminal issue
I have a problem with JLine 3.9.0. I created a terminal
Terminal terminal = TerminalBuilder.builder().encoding("UTF-8").system(true).build();
First of all it shows a lot of errors, to be precise:
...
1
vote
1
answer
659
views
Jline Terminal Writer Outputting Wrong Formatted Output
We're having some issues with the Jline library terminal when trying to use it's writer. When we try to write a string using the terminal writer's print statement, it's appending characters around the ...
0
votes
1
answer
432
views
Java : Jline3 : Autocomplete with more than one word
I would like to auto complete using more than one word, for example:
> we can<TAB>
welcome_trashcan pecan_seaweed yeswecan canwest
So all the suggestions should contain both of the ...
4
votes
1
answer
4k
views
JLine3 "Unable to create a system terminal" after build
I just tried to implement JLine with Jansi, but it throws always the same UnsupportedOperationException referring to org.jline.terminal.impl.jansi.JansiSupportImpl#winSysTerminal. Inspecting this ...
0
votes
1
answer
502
views
sbt jline dependency not found
In my local repo for scala/scala github project(here), jline dependency is set as 2.14.5. I change it to 3.1.3, but dependency is not resolved when I try to build the project.
How to get it resolved?...
4
votes
1
answer
202
views
How can I make JShell stop wrapping lines back on themselves?
I'm using JDK 9 build 179 on Windows 7. I've got the "Screen Buffer Size Width" property of my Windows 7 command shell, set to a large number because that's the way I roll. That works fine normally; ...
1
vote
1
answer
1k
views
How to display command history with jline3?
I want the most recent command entered to be displayed when the user presses the up arrow key.
The Terminal is defined like this (Scala code):
val terminal: Terminal =
TerminalBuilder.builder
....
0
votes
1
answer
199
views
Obtaining the collection of jline3 commands from a TreeCompleter
I have a TreeCompleter (Scala code) which works as expected:
val treeCompleter = new TreeCompleter(
node("bindkey"),
node("cls"),
node(
"custom",
node("Option1", node("Param1",...
0
votes
1
answer
904
views
How to display all commands using jline3
I have a TreeCompleter (Scala code) which works as expected:
val treeCompleter = new TreeCompleter(
node("bindkey"),
node("cls"),
node(
"custom",
node("Option1", node("Param1",...
1
vote
1
answer
907
views
Java Mockito stuck at doReturn of singleton method
I have a singleton class to help me reading input from the console:
public class IOHelper {
public org.slf4j.Logger logger = Logger.logger;
//JLine
public ConsoleReader cr;
private ...
1
vote
0
answers
296
views
How to tell Java to use jline3
Scala newbie and following this blog to use sbt (I have a little Java experience using Eclipse).
sbt is working, however I must have the ncurses issue described here. Instead of downgrading ncurses I'...
1
vote
1
answer
722
views
Detect Ctrl and Alt keys at a Java console
I'm currently using JLine (http://jline.sourceforge.net/) to read characters from the console in Java one at a time.
Terminal terminal = TerminalFactory.getFlavor(TerminalFactory.Flavor.WINDOWS);
...
0
votes
0
answers
282
views
how to deploy java application with native code from 64 bit windows to 32 bit windows?
i hope caps lock haters are now pleased and in paradise. as you can see, all letters are small. enjoy yourself.
anyway, i have a question about java.
i have application written in java which uses ...
1
vote
1
answer
2k
views
Java Console Application with jLine
I have a multi thread java console application. One of the threads is reading input from the user while other prints to the console some data. The problem shows up when the writer thread print ...
2
votes
1
answer
5k
views
Set terminal background color with Java
I have a Java program that uses JLine2 to handle input and output on the console terminal. For aesthetic reasons this program works best if the background color of the terminal is white.
So, Is it ...
1
vote
1
answer
3k
views
JLine 3 - Keep the prompt always at the bottom
I want the prompt to display at the bottom of the page every time.
I have a GIF of that: The prompt not displaying properly
The code is that for read line:
@Override
public void run()
{
while ((...
4
votes
1
answer
2k
views
"Bad File Descriptor" exception because of using nohup
My application can be launched via Terminal in linux OS as shell executable file.
I have no issues while executing it normally, however when i execute it along with 'nohup' command , it logs below ...
0
votes
1
answer
63
views
Scala -jline file completer causes file not found (linux)
I'm seeing something very bizarre in this piece of code.
command match {
case "q" | "quit" => done=true
case "f" | "file" =>
{
// console_reader.addCompleter(...
3
votes
2
answers
5k
views
Java Command-Line App with own prompt [closed]
I'm writing a JAVA-Console-Application. After the user started the jar he should get a Commandline like the Linux shell, where he can enter commands. This is something I never programmed before. ...
6
votes
1
answer
1k
views
Use JLine to Complete Multiple Commands on One Line
I was wondering how I could implement an ArgumentCompleter such that if I complete a full and valid command, then it would begin tab completing for a new command.
I would have assumed it could be ...
8
votes
1
answer
662
views
jline2 print "^J" when it should print "\n" on a telnet console
I am using JLine 2 (v2.13) in conjunction with a Socket IO to create an admin console for my app which can be accessed via an ordinary telnet client. However I found it prints out strange symbols when ...
2
votes
1
answer
950
views
How is CTRL+C handled in jline2
I had a hard time trying to understand how is CTRL+C handled in jline2. I found in consoleReader.readline an exception will be thrown if handleUserInterrupt is set to true. But I wonder before this ...
3
votes
1
answer
319
views
Bug in JLine2? ConsoleReader.clearScreen
EDIT: This feature only occurs when I invoke the clearScreen method of ConsoleReader! Any other changes don't have an effect. Is this then a bug in JLine2?
JLine2:
Why, when I run this, do I get two ...
2
votes
0
answers
131
views
How to set filecompleter for every command arguments in java jline ConsoleReader?
I need to add file names completer for every command parameters.
ConsoleReader consoleReader = new ConsoleReader();
consoleReader.addCompleter(new FileNameCompleter());
consoleReader.addCompleter(new ...
3
votes
0
answers
87
views
Use inputrc inside sbt
I would like these settings to work seamless in my shell as well as in sbt.
Is there something special I need to do to get these working?
My ~/.inputrc:
\C-Space:complete
\C-i:menu-complete
"\C-f": ...
2
votes
0
answers
95
views
Usine JLine2 with SocketInputStream
I am currently trying to include the JLine2 library (version 2.13) for the custom telnet implementation, but, I cannot get it to work.
I am creating a ConsoleReader with:
ConsoleReader reader = new ...
1
vote
0
answers
175
views
Readline support when running programs in Eclipse
I've just started using JLine for console input in my programs. In a bash shell, this works great. In the Eclipse Console view, nothing useful works - no history, no command completion.
Is there a ...
2
votes
0
answers
371
views
JLine: File Completion doesn't work on Windows
I want to use JLine to build a simple CLI. But I ran into a problem. File name completer doesn't work properly on Windows.
When I enter 8> first C:\ and press tab, completer do nothing although it ...
0
votes
1
answer
1k
views
How do I get ANSI bright colors to work in the windows cmd?
I am using java, the jline library and jansi. I have regular colors working just fine, either using \u001B[32m for example, or Ansi.ansi().fg(Ansi.Color.GREEN).
However, I cannot seem to get the ...
11
votes
2
answers
9k
views
zookeeper client does not provide CLI with "jline support is disabled" message
I just brought up CDH 5.4 and installed zookeeper. I used zkCli successfully many times before. This time the command line launch stops before getting to the prompt with
Welcome to ZooKeeper!
JLine ...
1
vote
0
answers
104
views
JLine2: Is it a bug in completion mechanism or not?
Here is my Java code.
public class CompletionTest {
public static void main(String[] args) throws IOException {
ConsoleReader console = new ConsoleReader();
Completer nil = new ...
5
votes
1
answer
2k
views
IntelliJ IDEA doesn't intercept JLine code completion in bebug mode
I tried to run simple Java application wich is used code completion. When I run it in separate console it works like a charm. But when I try to it via IntelliJ IDEA, then my IDE doesn't intercept code ...