Best option for packaging Java CLI applications for OS / X and Unix?

What is the best option for packaging and distributing a command line application written in Java to install OS / X and Unix?

The executable jar parameter seems pretty reliable, and my distribution does not have to be very interesting, so right now I'm just thinking about attaching a bash script to the corresponding Java call and with it.

I am wondering if there is something similar to the python bdist package that would allow me to easily make good installers for both target platforms. Or if there is an even more obvious way that I am missing, where I can turn the entire distribution into an executable file that somehow wraps the jar.

+3
source share
1 answer

Since you are providing a CLI application, it might be easiest for you to provide the script that you already mentioned. I usually try to keep him alone, for example. d. not referring to external paths / using only relative paths, etc. And possibly a file readme.txt.

If you want to provide a full-blown installer, you can take a look at IzPack, a tool for creating installers for Java results . It also allows the wizard to run in console mode if you do not have a graphical environment available for installation (see the "Features" page in the link above).

+1
source

All Articles