解决IDEA使用junit test 时候无法使用Scanner

2020-08-05  本文已影响0人  海洋之心_

问题

IDEA下使用junit test 时候无法使用Scanner, 会出现卡住无法输入的情况

解决方法

IDEA下打开help-Edit Custiom VM Options


image.png

添加下面这段代码保存即可使用Scanner

-Deditable.java.test.console=true
上一篇 下一篇

猜你喜欢

热点阅读