I am wanting to pipe the Java console output (generated by System.out.println and its ilk) to a file. I found an excellent solution here to enable Java tracing,
System.out.println
If you launch it from command line, then you can use redirect stdout and stderr into file as follows:
java -jar application.jar >file.txt 2>&1
where you have to replace application.jar with the jar file of your application.