How to release patches for Java programs
I've recently released a cross platform Java application. For distribution w开发者_如何学运维e created a NSIS installer for Windows and used a DMG for Mac (that has JarBundled .app file). We also plan on creating Linux RPMs, DEBs and tarballs.
In total that's 5 different distribution methods to look after.
My question is: What is the best cross-platform way to patch a Java program that runs on many platforms?
Have you considered simply releasing new minor versions of the entire app, instead of patches? Since you will already have invested time into the installers for the various platforms, it seems like it would avoid a lot of hassle trying to come up with a second method for each platform. I can't think of a drawback unless your application is extremely large, as bandwidth is pretty cheap nowadays.
I would say that an Ant script is a reasonably cross-platform way to perform a task. If your patch logic includes moving some files around, updating jars, handling configuration etc., then Ant might suit you. You can use AntInstaller as a GUI.
This might not be an option for you, but I think the best way is to use Java Web Start.
It provides platform-independent mechanisms to automatically download patched versions of your software.
精彩评论