I was using readLine
of BufferedReader
to get input/new password from user, but wanted to mask the password so I am trying to use java.io.Console
class. Problem is that System.console()
returns null
when an application is debugged in Eclipse. I am new to Java and Eclipse not sure is this the best way to achieve? I am right clicking on the source file and selecting "Debug As" > "Java Application". Is there any workaround?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…