To truly redirect both, the simplest way is still to define your program as an external script
"java %1 %2 %3 %4 < %5 > %6"
(adapt the number of parameters to your particular program)
In the Run menu, click 'External Tools.../Open External Tools Dialog" and define an external launch configuration in which you will specify both the arguments and the input and output file.
It is not an ideal solution though, as you cannot debug directly your code (with a "debug" launcher configuration).
Instead you have to remote debug it (add '-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
' in your generic Java launcher script)
Once you have launched your external tool, launch a remote debug session through the "debug launcher 'Remote Java Application'" section:
