解决:IDEA 使用junit测试中new Scanner(System.in)没办法输入问题

1、如图在 help ->Edit Custom VM Options... -> 加上 -Deditable.java.test.console=true 这句话; 2、关闭缓存启动,如图: 3、重启idea即可使用junit测试中new Scanner(System.in)进行输入。
相关文章
相关标签/搜索