title: System.console() returns null
body: <p>I was using <code>readLine</code> of <code>BufferedReader</code> to get input/new password from user, but wanted to mask the password so I am trying to use <code>java.io.Console</code> class. Problem is that <code>System.console()</code> returns <code>null</code> 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?</p>