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.Con
readLine
BufferedReader
java.io.Con
System.console() returns null if there is no console.
System.console()
You can work round this either by adding a layer of indirection to your code or by running the code in an external console and attaching a remote debugger.