There used to be a bug in eclipse that prevented a run configuration from redirecting a file to stdin but supposedly it\'s fixed. However, I can\'t find any documentation t
You will need Eclipse Mars for this, as the bugfix was not backported.
Go into Run Configurations, open your Java Application. In the Common tab, there is a Standard Input and Output group, where you can define an input file.