Originally Posted by
Norm
To swap jars and a java execution, you might need a place to stand while you are doing the swaps.
It could depend on the OS.
Start another program to do the transit, End the current one. Do some cleanup. Start the new version and end the transitive program.
Yeah I came up with another idea after I posted this and it's kind of like what you just said.
I was thinking have the Launcher class run an update check method, and if there is an update, download a ZIP file with TWO jars. The new program jar and an updater program.
It extracts the ZIP and launches the updater. It then exits itself and lets the updater program take care of the cleanup, AKA delete the old jar and replace it with the new one. The updater then launches the new program and closes itself down. I suppose the main program could also check on start up for the existence of the updater and remove it to finish up the job cleanly.
How does that sound?