Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to hide user input in console mode?

 
Shuai Liu
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For example, when user input a password, I want the console to display **** instead of the actual input. What should I do?
THX!
 
Shuai Liu
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I forgot the search for old posts.
Please just ignore this question.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Out of curiousity, what's the link to the answer you found?
Thank You
 
Shuai Liu
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually. Somebody mentioned a post in Sun's community discussion. The author there tried to use a thread to hide user's input. It didn't solved the problem, but is the best solution I found so far.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic