LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Hiding password in Java command line program (https://www.linuxquestions.org/questions/programming-9/hiding-password-in-java-command-line-program-319000/)

simon_w 05-01-2005 06:20 AM

Hiding password in Java command line program
 
When entering input to a Java command line program, is it possible/easy to mask the input with asterisks?

jlliagre 05-02-2005 01:29 AM

This is usually not possible with pure Java, but achievable with some native code depending on platforms.
See Jline for an implementation:
http://jline.sourceforge.net/#reading_password

simon_w 05-02-2005 06:01 AM

I found this on the Java website. I looks a bit OTT/messy for the simple program I'm writing, so I'll give it a miss this time.


All times are GMT -5. The time now is 04:22 AM.