I want my application to create an error.log if, and only if, an error occurs. So I did this:
System.setErr(new PrintStream("error.log"));
Works as expected in Eclipse - error happens, error.log with error message pops up in the source dir.. The exported application, however, creates a completely empty log file right on program start, which is annoying. What's the reason for this behavior?