divert System.out into a file
The following Code makes the diverting from System.out.println(..) into a file possible:
System.setOut(new PrintStream(new FileOutputStream("out.log")));
The following Code makes the diverting from System.out.println(..) into a file possible:
System.setOut(new PrintStream(new FileOutputStream("out.log")));