eclipse - How to copy the error message from console to file in java? -
this question has answer here:
- java output console error message file? 5 answers
printstream out = new printstream(new fileoutputstream("test2_output.txt")); system.setout(out);
this above code not correct code.i require above file should contain error message produced in console. code error message console , copy message file.
you can redirect java standard out , standard error log files. in fact, here oracle's (user submitted blog) answer question:
https://blogs.oracle.com/nickstephen/entry/java_redirecting_system_out_and
Comments
Post a Comment