Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

capturing output - newbie question



I'm pretty new to Java, and have a question that I'm hoping will have a simple answer. I'm working with a jar file right now on a Windows laptop. When it executes, a DOS window opens up as well as the GUI. The user runs the program through the GUI, but error messages are displayed in the DOS window.

Every now and then the program crashes. When it does, bot the GUI and the DOS window close immediately so the error message is lost. Is there a way to automatically send the DOS window output to a file in addition / instead of the screen?

Thanks for everyones help!

Michael