How do I pipe the Java console output to a file?

Posted by Ced on Stack Overflow See other posts from Stack Overflow or by Ced
Published on 2009-03-09T14:12:48Z Indexed on 2010/04/23 10:43 UTC
Read the original article Hit count: 323

Filed under:
|
|
|

I found a bug in an application that completely freezes the JVM. The produced stacktrace would provide valuable information for the developers and I would like to retrieve it from the Java console. When the JVM crashes, the console is frozen and I cannot copy the contained text anymore.

Is there way to pipe the Java console directly to a file or some other means of accessing the console output of a Java application?

Update: I forgot to mention, without changing the code. I am a manual tester.

Update 2: This is under Windows XP and it's actually a web start application. Piping the output of

javaws jnlp-url
does not work (empty file).

© Stack Overflow or respective owner

Related posts about testing

Related posts about java