Archived
0

simple terminal

This commit is contained in:
2020-05-04 23:55:22 +03:00
parent e3d041de63
commit c000b82374
2 changed files with 31 additions and 1 deletions

View File

@@ -1,8 +1,22 @@
package mc.server;
import org.jline.reader.LineReader;
import org.jline.reader.LineReaderBuilder;
import org.jline.reader.UserInterruptException;
public class Main {
public static void main(String[] args) {
System.out.println("hello?");
LineReader reader = LineReaderBuilder.builder().build();
try {
//noinspection InfiniteLoopStatement
while (true) {
String line = reader.readLine();
System.out.println("line = '" + line + "'");
}
} catch (UserInterruptException ignore) {
// ignore
}
}
}