1、如图在 help ->Edit Custom VM Options... -> 加上 -Deditable.java.test.console=true 这句话;

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

2、关闭缓存启动,如图:

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

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

3、重启idea即可使用junit测试中new Scanner(System.in)进行输入。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
  • 2022-02-26
猜你喜欢
  • 2022-12-23
  • 2021-05-29
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2021-06-01
相关资源
相似解决方案