Re: I need help urgently.
- From: Gordon Beaton <n.o.t@xxxxxxxxx>
- Date: 05 Dec 2006 07:14:39 GMT
On 3 Dec 2006 02:04:59 -0800, Abs wrote:
Guys, i need a way so that i can mask the password on my program. I
want the password to appear as **** or something like that. I cant use
applets, awt or any other thing beyond our ICSE Std X syllabus. Threads
would be OK i guess but pls try avoiding it. Plz help
In a text console on any unix-like platform (you didn't specify
yours), you can do this to prevent the input from being displayed
while the password is entered:
http://groups.google.com/group/comp.lang.java.programmer/msg/a132c7feda18187a
If you want to display asterisks, you need to set "-icanon min 1" to
get character-at-a-time input, and do System.out.print("*") for each
character as it's typed.
/gordon
--
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
.
- References:
- I need help urgently.
- From: Abs
- I need help urgently.
- Prev by Date: Placements
- Next by Date: Re: RMI on HP-UX - application closes after bind
- Previous by thread: Re: I need help urgently.
- Next by thread: Programming Interview Books Store
- Index(es):