title: How to read password from console without using System.console()?
body: <p>I hit <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=122429">this eclipse bug</a>, where <code>System.console()</code> is not available for Java application launches. I have a small Java app that also requires a password to be entered that is only started from within the IDE. Is there any other way to <strong>safely</strong> read a password (meaning not displaying it on the console) from the console with only using JDK classes?</p>
  
  <p><strong>EDIT:</strong><br>
  I know of <code>System.in</code>, but that is displaying the inputed characters in the console and is therefore not safe.</p>
  
  <p><strong>EDIT2:</strong><br>
  I also want to note that one can create a batch file under windows or a small bash script under linux/unix in the project. By openening this file in eclipse with the system default editor, it will be started in a new console window where <code>System.console()</code> is available. This way you can start the application from within eclipse. but the project has to be built first, so that the binaries exist.</p>