解决IDEA控制台junit不能用Scanner输入
**问题:**IDEA在Junit测试中使用了Scanner,但是控制台一直转圈,无法输入

解决:在配置文件idea.exe.vmoptions、idea64.exe.vmoptions**中添加,
-Deditable.java.test.console=true
好像一个是32位的,一个是64位的,(不确定的话就都加上吧。。。)

https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000556544-Why-can-t-I-input-anything-from-console-when-i-run-unit-test-with-JUNIT

浙公网安备 33010602011771号