5 Replies Latest reply: Nov 19, 2010 10:36 AM by Darryl Burke RSS

    How to hide keyboard input in a Java console application?

      I am developing a console application that request a password, but I don't wanna the password to be shown in the console when the user enters it.

      The source code is something like that:
      System.out.print("Password: ");
      BufferedReader in = new BufferedReader(new InputStreamReader(System.in)) ;
      String password = "";
             password  = in.readLine() ;
      catch (IOException e) {}
      return s ;