dcsimg
Error Trapping
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   siva_prasad
Posted On:   Monday, January 7, 2002 05:42 AM

How can I make the errors to be printed directly in a file which i specify without being printed on the console. Please reply me back with small code.

Re: Error Trapping

Posted By:   Arun_Bharathan  
Posted On:   Monday, January 7, 2002 07:15 AM

Use this:

java.io.FileOutputStream stream = new java.io.FileOutputStream(outFileName);
System.setOut(new java.io.PrintStream(stream));

If you want to redirect error Stream into a file use System.setErr();
About | Sitemap | Contact