B4J Question How to stop java execution after uncaught error in resumable sub

fabton1963

Member
Licensed User
Longtime User
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?
 

aeric

Expert
Licensed User
Longtime User
B4X:
ExitApplication
Immediately ends the application and stops the process.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Maybe you need to check if the service is not running then terminate it.
 
Upvote 0
Top