Instead of sending it to system.out, do println() to a printwriter, wrapping a filewriter (or some combination, I can never remember the correct ones without looking at the JavaDocs).
If you're looking for a quicker fix, re-direct the output using ">" in the command line, into a file.
java progmain > filename.
-Josh