java - Eclipse reading stdin (System.in) from a file -


is possible eclipse read stdin file?

pure java

you can redirect system.in single line of code:

system.setin(new fileinputstream(filename)); 

see system.setin().

eclipse config

in eclipse 4.5 or later, launch configuration dialog can set system.in read file. see the announcement here.

common tab of launch configuration dialog


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -