• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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
 
There will be plenty of time to discuss your objections when and if you return. The cargo is this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic