Tuesday, March 19, 2002 09:38 AM
Many applications requesting passwords open /dev/tty for reading the password, rather than reading from stdin. You can drive such applications by using pseudo-tty (pty) devices, which allow programs to control the "master" side of a tty-type connection.
Unfortunately, Java doesn't give you direct access to the calls that control pty devices. You can either write some JNI code to handle those details, or track down a utility called pty-redir that will redirect stdin/stdout to a pty.