Correct, it won't work on Windows (unless you use Cygwin or the like) and I
don't know how to do the equivalent on Windows.  I don't think there is a
portable solution to turn echo off.  You'll have to use JNI or pop up a GUI
dialog.  Note that a GUI dialog to enter a password is a simple thing to do
with Java.

Mike

> -----Original Message-----
> From: Bob Tanner [mailto:tanner at real-time.com]
> Sent: Monday, January 14, 2002 11:31 PM
> To: Mike Bresnahan
> Cc: tclug-devel at mn-linux.org
> Subject: Re: [TCLUG-DEVEL] Hidding passwords in Java?
>
>
> Quoting Mike Bresnahan (mbresnah at visi.com):
> > This was asked recently on the TCJUG.  Noone offered a solution
> other than
> > using JNI to call either getpass(3) or tcsetattr(2).  Me thinks the Java
> > designers decided that terminal I/O was not part of the least common
> > demoninator.
>
> I've been messing around with the streams and experimenting with replacing
> System.in, but I can't keep the keystrokes from appearing on the console.
>
> getpass(3) or tcsetattr(2) Eeek! I don't think those will work
> under Losedows.
>
> --
> Bob Tanner <tanner at real-time.com>         | Phone : (952)943-8700
> http://www.mn-linux.org, Minnesota, Linux | Fax   : (952)943-8500
> Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9
>