freelanceprogrammers.org Forum Index » Java

Password input from System.in


View user's profile Post To page top
dnp7 Posted: Mon Feb 25, 2002 2:08 pm


Joined: 19 Feb 2002

Posts: 22
Password input from System.in
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.<br><br>Beforehand given thanks,<br>Dmitry
Reply with quote
Send private message
View user's profile Post To page top
epenak Posted: Mon Feb 25, 2002 11:07 pm


Joined: 31 Jan 2002

Posts: 39
Password input from System.in
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.<br><br>epenak
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help