[izpack-devel] Self-Extracting and Self Running Jars -- Anyone Want Info On Them?
Hal Vaughan
hal at thresholddigital.com
Sun May 14 21:01:32 CEST 2006
The program I'm using IzPack for is for Windows and Linux only. Since
it's the first experience my clients will have with my company, my
services, and my software, I want it to be as effortless, easy, and
idiot-proof as possible. I've found that, for people on some operating
systems, even telling them "right click, pick 'run with' and pick Java"
can be a pain because they're not used to context menus or thinking
about what they do on computers.
I found out how to create self-installing archives for both Linux and
Windows. The Linux archives are easy to make and basically involve
using "cat" to add the archive to a bash script and later "tail" from
within the script to extract the archive. It's a bit more complex on
Windows and requires 7-Zip, which is also open-source and the developer
was quick to respond to my questions. The method for making Linux
self-extracting archives should work on any Unix system that uses bash
and I would think it would work on any Mac with OSX on it, since it
uses only script commands and no natively compiled code.
When clicked on or run, these archives will automatically self-extract
and run a specified program (in this case, I have it run "java -jar
Install.jar") and clean up the temp files when done. As usual, this
script won't run directly from a CD in Linux unless "sh" is used to run
it (which also means running it from a browser often won't work).
However, I think it's about as much as can be done to make a jar file
idiot proof, since a programmer or program distributor has no control
over how the MIME types are defined on someone else's computer.
The draw back is that IzPack is multiplatform and these archives are
platform dependent. However, the same IzPack Install.jar can be used
to create self-extracting and self-running archives for all different
platforms. I have a script set up that will use two of these archives
to install Java, then run my IzPack install. On a web install, only
the first jar needs to be self-extracting. All the pack jars can be
left as they are.
Is there any interest in this among other programmers? I am not at a
point where I can actually integrate this into the compile process
because I have some other work that has to be done, but I will be glad
to post all the instructions and links I have on it and work with
anyone who wants to either standardize into a script or two so it's
easy to do or who wants to do some of the programming.
At the very least, I can write it up as documentation for IzPack as "How
to Make Your Archives Self-Extracting and Self-Running".
I'm not going to do it, though, if there's no interest.
Any comments?
Hal
More information about the izpack-devel
mailing list