Command completion in JVM

Hi!

What is the expected way to implement it in the JVM? Does this task have a verified solution in any JVM languages? System.in input stream has input only after the user hit the Enter key in the terminal process, and then all input is available in java program. I could use existing libraries such jline, but they implement the terminal itself, which is not a fair solution for me.

Hey @unrealwork, while there’s no officially expected way to do this, one approach you can try is using raw mode to disable input buffering.

@whg333 has shared a helpful hint on how to do that:

1 Like