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?