I have just tried to create an automatic update button for an application of mine. First my app checks if a newer version is available, if so it then it is supposed to start an updating app which downloads the latest version of the program (which is an executable Jar). The updater then replaces the old version with the new one and starts the new version running. In order to replace the old file with the new one I need to shut down the old version.
I have tried using System.exit(0); but this seems to shut down my updater as well
Could someone please let me know where I am going wrong here? How can I shut down the original app without shutting down the updater?
I tried replacing my update app with another that does not use arguments and it was shut down as well. Does System.exit(0); shut down every process running in the JVM? If so is there any was to shutdown a specific app in the JVM?
(So the answer was, it wasn't anything to do with the main application shutting down, it was just that the process you started always failed until you got that fixed?)
(And as you may have figured out by now, the phrase "process running in the JVM" doesn't mean anything. The process you create is an independent process which isn't "in the JVM" in any way. Just trying to clarify for the benefit of future readers.)