Open nobeans opened 14 years ago
This is because of System.in(STDIN) is not console(tty) when the Groovyserv is running. This is same as that
istty(STDIN)
is false when the standard input is not associated with "/dev/tty" (maybe it's a pipe).
And this the reason why groovysh can't run under groovyserv property about command line editing with JLine library.
Password input (Passwrd: ***) is not work because of same reason.
To implement this behavior correctly you have to write pseudo tty handling like GNU Screen (or expect).
Can you point me in the right direction for how to write the tty handling?
You can use System.out
, System.err
. If you want to handle an user input, you can also use System.in
.