I use JNI, and when a crash occurs due to errors in the target application, the hs_err_pid * .log file is created. I want to change the default location where this file is stored. Now from the search, I understand that this can be achieved with the JVM -XX: ErrorFile argument.
The documentation states that the default value for this parameter is equal. / hs _err_pid <pid >.log
Now that I am overriding the default value, how can I tell the JVM to still contain the process id in the file name? I obviously tried to literally set targetDir / hs_err_pid <pid >.log as a command line parameter, but this led to ignoring the entire argument (and the file stored in the default location, i.e. in the working directory), if I only say targetDir / hs_err_pid .log, the file is stored where I want, but does not get the process identifier added to the file name.
Any suggestions would be appreciated.
source
share