I need to figure how to notify myself when my Java application stops running. I'm imagining another Java application, running in a separate JVM, that acts as a daemon and does nothing but check if the other application is running. It will email me if not. It will sleep most of the time.
I must use another JVM, because my customer ends my application by killing the entire JVM.
Is there any way for a class in one JVM to know if another JVM is even running? (I'm running on Windows.)
If so, is there any way to know which classes the other JVM has loaded?
BTW, I know I can solve this by having the watcher check for any changes in my application's log file, but that's not ideal. It would be better to check directly if I can.