The derby.stream.error.file property specifies the name of the file to which the error log is written.
If the file name is relative, it is taken as relative to the system directory.
If this property is set, the derby.stream.error.method and derby.stream.error.field properties are ignored.
If you specify this property, the property setting appears in the error log.
derby.log.
derby.stream.error.file=error.txt
This property is static; if you change it while Derby is running, the change does not take effect until you reboot.