What is the best way to have a (Java) program recognize it crashed last time it ran and show a message along the lines of "it looks like this program crashed on you last time. Report this problem here: [email protected] ...."
Is there a recommended way of doing this? (Bad?) ideas I had would be:
- Have the program store a temporary key file at startup and then delete it when closing regularly. If the file exists at startup, show the message.
- Recognize deadlocks and store an "error file" in this case. If an "error file" exists at startup, show the error message and move the file into an archive or something similar.