Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By JosAH

Thread: I need to keep my aplication alive!

  1. #1
    cr0ck3t is offline Member
    Join Date
    Nov 2013
    Posts
    4
    Rep Power
    0

    Default I need to keep my aplication alive!

    I'm running an javafx application on Windows 7 and want to have it restart automatically if it crashes - if anyone has had to do this before, some guidence would be most appreciated!

    Thanks!

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: I need to keep my aplication alive!

    Sounds like a job for a shell script.
    Get in the habit of using standard Java naming conventions!

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,900
    Rep Power
    5

    Default Re: I need to keep my aplication alive!

    Yeah or an outer bootstrapping/launcher program that creates the process of the "real" application and then goes to sleep until the child process either closes gracefully, in which case it closes itself, or detects that the program closed in any other way in which case it restarts the process.

    But that's quite an advanced solution. And probably won't work if this JavaFX application is deployed as an applet.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,450
    Blog Entries
    7
    Rep Power
    20

    Default Re: I need to keep my aplication alive!

    If your application crashes, there's most likely a nasty bug in it somewhere; why not fix the bug instead?

    kind regards,

    Jos
    gimbal2 likes this.
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,900
    Rep Power
    5

    Default Re: I need to keep my aplication alive!

    Good point ;)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Keep database connection alive
    By major in forum JDBC
    Replies: 7
    Last Post: 06-29-2011, 09:21 AM
  2. How to send keep-alive in smpp
    By uthpalaw in forum Advanced Java
    Replies: 0
    Last Post: 05-24-2011, 02:39 PM
  3. Making an aplication on top
    By RKhadder in forum New To Java
    Replies: 0
    Last Post: 09-25-2010, 12:28 AM
  4. It's Alive!
    By Snoman in forum New To Java
    Replies: 21
    Last Post: 08-01-2010, 12:02 AM
  5. Keep my TCP connection alive
    By eggmanpete in forum Advanced Java
    Replies: 4
    Last Post: 03-02-2009, 06:11 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •