Thanks David and Kevin,

I tried System.console() in the code. The mystery is it could work in
clojure repl, but System.console() will return null if I put everything
into jar package. Per the spec, system.console could return null. I don't
quite understand why the two cases are different.

Best regards,
-stanley

On Tue, Feb 7, 2012 at 10:16 PM, David Powell <djpow...@djpowell.net> wrote:

>
> If you have Java 6 (and you probably do), then look at:
>
> http://docs.oracle.com/javase/6/docs/api/java/io/Console.html<http://docs.oracle.com/javase/6/docs/api/java/io/Console.html#readPassword%28java.lang.String,%20java.lang.Object...%29>
>
> Simple example:
>
>   (String/valueOf (.readPassword (System/console) "Password:" nil))
>
> --
> Dave
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to