java.util.scanner throws NoSuchElementException when application is started with gradle run

后端 未结 1 2015
醉梦人生
醉梦人生 2020-12-06 05:32

I have a created a simple java \"echo\" application that takes a user\'s input and shows it back to them to demonstrate the issue. I can run this application without trouble

相关标签:
1条回答
  • 2020-12-06 05:45

    You must wire up default stdin to gradle, put this in build.gradle:

    run{
        standardInput = System.in
    }
    
    0 讨论(0)
提交回复
热议问题