How can I redirect STDIN and STDOUT to files?
In C, this would be done like so:
freopen(\"file.in\",\"r\",stdin);
I am looking for some
You can do it using the Java System api. The code is nearly identical for Java and Scala:
System.setIn(new FileInputStream("file.in")) System.setOut(new PrintStream(new FileOutputStream("file.out")))