Restart after crash: only if exit code is a specified one
Brought to you by:
grzegok
Hi, there is an option "Restart the application after a crash", but this also restarts the app if, for example, Java crashes.
I would like to set up a exit code, for example 100, and the app should only restart if the exit code of my java app is 100.
Hi, I would vote for this request to.
Currently we see the following situation. A client application restarts itself after a server connection loss with the combination of System.exit(100); and restartOnCrash=true. This works as expected.
In some cases the client cannot be started due to a JVM crash. We had this in case there was not enough memory available. In this case restartOnCrash=true forces launch4j to start the client again and again and again. This also results in an endless loop of the appearing and disappearing splash screen. (looks a little funny :) We could prevent this with a setting like restartOnExitCode=100.
Best wishes
Stefan
Agree with this. The current functionality is not usable for us. I would expect to be able to define an exit code or range of codes that allow restart.
I agree, having a way to specify one specific exit code would be great (if there is no other way to trigger a restart-signal?)
In our case we have additional VM parameters added to the l4j.ini file during startup when we do an "application update" and therefore would want a restart. Currently we display a notification that restart is needed which is less user friendly.
Any workaround for this scenario?
This is very important, in order to update a java application (using update4j for example)
I would expect an optional attribute in the xml where I can define a specific return code (between 3? and 255). Whenever the java application returns the code defined in the xml restart anyway.
https://github.com/mirror/launch4j/pull/15