Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Password input from System.in

  Asked By: Lourdes    Date: Jan 22    Category: Java    Views: 1224
  

I have the code:<br><br>System.out.print("Enter
password: ");<br>BufferedReader in = new BufferedReader(new
InputStreamReader(System.in));<br><br>What can I do for hiding of inputed
password in
command line.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Ora Hanson     Answered On: Jan 22

You do not have control of the command line  from
within Java. Generally, whatever is typed there, stays
there unless you override the OS functionality, as far
as I know.<br><br>Instead, I would suggest you use
the TextField or JTextField to present a small gui
that can hide the password  characters.

 
Didn't find what you were looking for? Find more on Password input from System.in Or get search suggestion and latest updates.




Tagged: