I am running my application as a service on a Windows server using the 'nssm' utility and the following Java command: `java -jar myapp.jar`. NSSM can restart a service when the task dies, but in the case of Java errors, this doesn't happen because my application stops working. The last log message shows a runtime exception, but Java continues to run. Are there any solutions to force the application to exit in case of an uncaught error?
I read a very interesting post that shows how to use a non-UI B4j program in Windows service However, it could happen that the program interrupts its functioning for various reasons The question is: how to create a second B4J program to test whether a Windows service is running and, if not...