Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to release patches for Java programs

I've recently released a cross platform Java application. For distribution we 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?

like image 307
cdmckay Avatar asked Feb 11 '10 19:02

cdmckay


3 Answers

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.

like image 75
Peter Avatar answered Oct 27 '22 00:10

Peter


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.

like image 39
Eli Acherkan Avatar answered Oct 27 '22 00:10

Eli Acherkan


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.

like image 29
Peter Lang Avatar answered Oct 27 '22 01:10

Peter Lang