eclipse - How to copy the error message from console to file in java? -


this question has answer here:

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

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -