Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Cary, NC

    Question Unanswered: JDBC password mask

    I am just getting started with Oracle and JDBC, I have the following snipit of code that gets the username/password, which is then used for the connection.

     String dbUser = "";
    String dbPassword = "";
    try {
    	 InputStreamReader inReader = new InputStreamReader(;
    	 BufferedReader bReader = new BufferedReader( inReader );
    	 System.out.print("Enter your user id: ");
    	 dbUser = bReader.readLine();
    	 System.out.print("Enter your password :");
    	 dbPassword = bReader.readLine();
    The code is functional and it connects me to my database, however, the password is displayed as it is typed and since this is a console ran application, the password remains displayed as long as that console window is open.

    What is the simpliest way to allow a password to be entered without displaying it on the screen?


    (Application is ran on a Solaris box)


  2. #2
    Join Date
    Jan 2004
    This is not an Oracle problem - it is an issue with Java.

    However, the following link may help:

    It would be best to post Java related issues on a Java forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts