I need to write an updater for a simple java application. It should work with the existing installation directory and update the property and binaries. It should not destroy the existing directory in order to allow "cancel" in the event of a failure in the process.
I think of a general algorithm:
- Create a new directory next to the existing one.
- Extract new binaries to a new directory
- Copy and merge everything you need to copy from the old directory to the new one.
- Rename the older directory to what.tmp.random #
- Rename the new directory to the original name of the source directory
- Delete old directory
Is there a well-known template or free third-party update packages in Java? I do not want / need an expensive installer product.
source
share