System.console() returns null

后端 未结 12 1010
有刺的猬
有刺的猬 2020-11-22 04:55

I was using readLine of BufferedReader to get input/new password from user, but wanted to mask the password so I am trying to use java.io.Con

12条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 05:40

    If your IDE uses javaw instead of java, then this issue is bound to happen as javaw is essentially java without console window.

提交回复
热议问题