Share this page 

Redirect stdout to a fileTag(s): IO


[JDK1.1] application only
System.setOut(
    new PrintStream(
      new BufferedOutputStream(
       new FileOutputStream("OUTPUT.DAT")))); 

You may want to look at this How-to to redirect exception output to a Frame.