• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

ProcessBuilder to launch from main app then exit main app

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to launch a .bat file, "update.bat" from within a java application, let's call it calculator.java. I have been able to do this via ProcessBuilder. The thing is, I need to launch this "update.bat" then exit calculator.java without waiting for a return.

Through testing, it seems as though calculator.java doesn't fully exit until the "update.bat" is complete and returns. Here's the catch: "update.bat" launches a second java app that downloads and updates jars within the classpath of the original java app (calculator.java). It seems as though i'm running into some sort of deadlock issue.

I know that webstart would probably be a better solution, but in my current situation , webstart is not a option.

So here is the crux of my post: Can I launch an application (.bat, .exe) from within java and then have java exit without waiting for the spawned application to exit?

thanks in advance,
cotfessi
reply
    Bookmark Topic Watch Topic
  • New Topic