Results 1 to 3 of 3
  1. #1
    Dr_Misterio is offline Member
    Join Date
    Aug 2009
    Posts
    1
    Rep Power
    0

    Question How I launch an external program and kill the father?

    my objective is that a jar file autoupdate himself with other jar file.

    I must delete old file and replace with a new one, but it is imposible if it is running.

    I think launch auxiliar application to do the work but when I use "Runtime.getRuntime.exec("....")" first program does not finish if the second one is not finished.

    Also I tried with "Runtime.getRuntime().exec("cmd /c calc.exe");" and using Threads "setDaemon(true)", but does not work, daemon thread dies when first program finish.

    Any idea?
    thanks

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    6

    Default

    Before anyone writes a lengthy reply, check whether he got that reply already here:
    Java Programming - How I launch an external program and kill the father?

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

Similar Threads

  1. Execute external file/program
    By sirwiggles in forum New To Java
    Replies: 3
    Last Post: 04-21-2009, 11:35 PM
  2. Replies: 0
    Last Post: 04-04-2008, 02:40 PM
  3. Replies: 0
    Last Post: 10-04-2007, 09:33 PM
  4. Use a external file in my program
    By romina in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:28 AM
  5. launch a desktop icon program command
    By avaj987 in forum New To Java
    Replies: 3
    Last Post: 08-03-2007, 11:40 AM

Posting Permissions

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