I am trying to put the console in raw mode in Java. I understand that this will only work on UNIX.
I use the command stty raw
If I type a command directly into the terminal, it does what it should do. In Java, I am trying to set this mode:
Runtime.getRuntime().exec("stty raw");
But the terminal does not go into raw mode.
I have a feeling because Java just executes a command in a virtual terminal in the background or something, and not in the active terminal. Is there any way to do this?
source
share