@@ -0,0 +1,1002 @@
+/*%0A * Copyright (c) 2002-2012, the original author or authors.%0A *%0A * This software is distributable under the BSD license. See the terms of the%0A * BSD license in the documentation provided with this software.%0A *%0A * http://www.opensource.org/licenses/bsd-license.php%0A */%0A%0Apackage jline.example;%0A%0Aimport jline.console.ConsoleReader;%0A%0Aimport java.io.IOException;%0A%0Apublic class PasswordReader%0A%7B%0A    public static void usage() %7B%0A        System.out.println(%22Usage: java %22%0A            + PasswordReader.class.getName() + %22 %5Bmask%5D%22);%0A    %7D%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        ConsoleReader reader = new ConsoleReader();%0A%0A        Character mask = (args.length == 0)%0A            ? new Character((char) 0)%0A            : new Character(args%5B0%5D.charAt(0));%0A%0A        String line;%0A        do %7B%0A            line = reader.readLine(%22Enter password%3E %22, mask);%0A            System.out.println(%22Got password: %22 + line);%0A        %7D%0A        while (line != null && line.length() %3E 0);%0A    %7D%0A%7D%0A

Add PasswordReader from jline 1.x