How do I redirect Scanner(System.in) to read from a file via the IntelliJ IDE?
已回答
I cannot seem to find any information about how to declare a Scanner(System.in) and use the IntellIJ IDE to redirect that to read from a file of my choosing by specifying the (preferably relative) path to the file.
I've done this in Eclipse via their "Run Configuration / Common / Input File / " dialog and am struggling to do the same thing using IntelliJ IDEA while leaving the scanner alone (always use System.in).
Searches of the IntelliJ FAQ's and other online searches return no usable results, thus I pose the question in this forum.
请先登录再写评论。
See https://youtrack.jetbrains.com/issue/IDEA-88717 and https://stackoverflow.com/a/42869805/104891.
Based upon the links provided, people have been waiting for almost seven years (2011-11-17) for JetBrains to implement this feature.
Intelligence, guided by experience, tells me this is never going to happen in my lifetime.