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 when I hit enter, it tells me Could not find command 'asd'. Type 'help' for help
So the String I enter gets read, but does not show up.
Windows command prompt, start script:
@echo off
java -jar PixelCloud.jar
pause
I've tried to put my Code in a thread, use Scanner, use BufferedReader, use ConsoleReader and none worked
AnsiConsole.systemInstall();
try {
reader = new ConsoleReader(System.in, System.out);
} catch (IOException e) {
e.printStackTrace();
}
console = new ColoredConsole();
console.sendMessage(Message.TYPE_HELP);
String line;
System.out.println("test");
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
while((line = reader.readLine()) != null) {
System.out.println("test2");
Command.dispatchCommand(line);
}
I expect when I type asd
, that asd
is shown while I type it.
My current console Output is
Type "help" for help.
test
test2
Could not find command 's'. Type "help" for help.
test2
Could not find command 'hello'. Type "help" for help.