Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

JVM crash recovery?

2008-07-22
2013-08-21
  • Daniel Lindner
    Daniel Lindner
    2008-07-22

    Hello there,

    first of all: Thank you for this wonderful project. It works like a charm.

    I have a question about a functionality i'm not sure about:
    I want to start a JVM and have it restarted when it crashes (or even better, when strange Errors are reported). I know about the Java Service Wrapper doing exactly that.

    Now, there's the problem: I cannot think of a gentle way to integrate JSW with Launch4J. Currently, i'm using Launch4J and don't want to lose its features. I also dislike the way JSW configures the launch environment.

    The question is: Is recovery functionality planned for Launch4J? Or, as an alternative answer, did anybody integrate JSW (or some other recovery-capable project) and Launch4J?

    Thank you, Daniel

     
    • Grzegorz Kowal
      Grzegorz Kowal
      2008-08-03

      Hello,

      Actually a program restart should be simple to add, the only problem is detecting the reason of it's termination (so it doesn't restart just because a user closed it). I'll see if it's possible.

      Thanks,
      Grzegorz

       
    • Zeljko
      Zeljko
      2009-05-20

      This would be a very nice feature, and finally there will be a simple way to restart java app. You could check the exit code (error level) when the app exits, so, for example when System.exit(100) is called, app will restart.

       
  • Dan Gravell
    Dan Gravell
    2013-06-04

    Was anything ever done on this? A restart if exit code == some value would be an excellent addition, I think.

     
  • Grzegorz Kowal
    Grzegorz Kowal
    2013-08-21

    It's in the feature requests and I am thinking about it :)

    BR,
    Grzegorz