Execute 'stty raw' command in same terminal?

Posted by Matt on Stack Overflow See other posts from Stack Overflow or by Matt
Published on 2010-12-25T21:44:43Z Indexed on 2010/12/25 21:54 UTC
Read the original article Hit count: 216

Filed under:
|
|
|

I'm trying to put the console into "raw" mode in Java. I understand this will only work on UNIX.

I'm using the command stty raw

If I type the command into the terminal directly, it does what it's supposed to do. In Java, I try to set the mode like this:

Runtime.getRuntime().exec("stty raw");

But the terminal does not go into raw mode.

I have a feeling this is because Java is just executing the command in a virtual terminal in the background or something, rather than the active terminal. Is there a way to do this?

© Stack Overflow or respective owner

Related posts about java

Related posts about unix