Hide input on command line

后端 未结 5 1535
清酒与你
清酒与你 2020-11-27 16:08

I know that command line interfaces like Git and others are able to hide input from a user (useful for passwords). Is there a way to programmtically do this in Java? I\'m ta

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-27 17:14

    The class Console has a method readPassword() that might solve your problem.

提交回复
热议问题