Hmm, when you start BEA Weblogic without a password on the command line it manages to 
suppress the echo, but I have no idea how it does it.

I guess you would have to redirect System.out/System.err temporarily. That can get 
quite messy.

The Swing/AWT approach is good, provided you know there is a GUI available (i.e. not 
much good if you're running a Telnet session without an X-display somewhere)

Keith



-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@;apache.org]
Sent: 06 November 2002 12:39
To: [EMAIL PROTECTED]
Subject: Re: Hiding input variable..


On Wed, 6 Nov 2002, Soer J. <[EMAIL PROTECTED]> wrote:

> Is it possible to hide the typing ?

No, you cannot reliably suppress characters while reading from
System.in in Java at all.  There are workarounds like echoing
backspace characters like mad, but it doesn't really work.

Writing an AWT InputHandler and using a TextField with the echoChar
set (or Swing and JPasswordField) would work, though.

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@;jakarta.apache.org>

Reply via email to