System.out vs System.err questions
407566Jul 15 2008 — edited Jul 15 2008Hello,
System.out and System.err both seem to direct regular and error output to the stdout. I have the following questions:
1. I used System.setOut() to direct regular output to "Output.txt" and System.setErr() to direct errors to "Errors.txt". I purposely made the program to throw some exceptions, wanting to redirect them to "Errors.txt". It did not work. My question is "What kind of errors setErr() would direct to an error file?"
2. Without using setErr(), errors go to stdout. My question is "Does Java hava a configuration file I can configue to direct regular output to stdout, but errors to a user-defined file such as errors.log?"
Thanks!