• Post Reply Bookmark Topic Watch Topic
  • New Topic

ProcessBuilder to launch from main app then exit main app  RSS feed

Scott Presley
Posts: 25
  • Mark post as helpful
  • send pies
  • 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,
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!