How do I redirect Scanner(System.in) to read from a file via the IntelliJ IDE?

Answered

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.

0
2 comments

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.

0

Please sign in to leave a comment.