This discussion is archived
5 Replies Latest reply: Nov 19, 2010 8:36 AM by DarrylBurke RSS

How to hide keyboard input in a Java console application?

843790 Newbie
Currently Being Moderated
I am developing a console application that request a password, but I don't wanna the password to be shown in the console when the user enters it.

The source code is something like that:
System.out.print("Password: ");
BufferedReader in = new BufferedReader(new InputStreamReader( ;
String password = "";
       password  = in.readLine() ;
catch (IOException e) {}
return s ;