integrating the autoupdate feature into a java application
auto-update, java, java-web-start, javafx
Solution
Don't bother reimplementing an issue that's been resolved for java before. It's called Java Web Start. It does exactly what you need. It's even multi platform!
Problem
I am faced with an issue of implementing an autoupdate feature into a desktop JavaFX application. I'm not sure if it makes a difference - but it's going to be run by double-clicking the .jar file and will have a GUI representation, obviously. Now to the problem: I need to perform an autoupdate upon the app's execution - this means syncing with a server and checking if an update is available: if so, then download the new version and reload the current one. I'm not very familiar with any optimal approaches to this issue. This is what I need to solve, as it seems: A - somehow download to the same location where the currently ran file resides with the same file name (AFAIK Windows deliberately places a block on every running file / process - claiming for it to be in use) B - figure out a way how to launch a new process within this application that won't die upon its termination (in order to reload the new v.) I figure B can be manipulated differently - anyway, the end result is that I must have the same file name in the same directory, as the initially launched app. I guess even more complexity is added due to the fact that this should be multiplatform capable - Windows + MacOSX. Anyhow, I would be grateful to see suggestions even relative to only one of the OSs in question.