views:

3003

answers:

9

Which (commercial or free) installer tool would you recommend to replace InstallAnywhere as the installer for a Java EE application? What do you specifically like about it, and what are its downsides?

Some requirements:

  • Must support running custom Java code as part of installation procedure
  • Must support Windows, including latest 64-bit versions like Windows Server 2008; support for other target operating systems is a plus
  • Must be able to install a bundled application server (such as Resin or Tomcat) as a service on Windows
  • Must support basic stuff like copying and moving files around, editing configuration files, extracting ZIPs, etc.
  • (Must support bundling a specific version of JRE; at the very least by including a ZIP to be extracted)

Edit: a few more points:

  • Preferably does not depend on a preinstalled JRE (or any other 3rd party runtime environment or library) on target machine; in other words, can produce an independent Windows .exe (or .msi)
  • The tool should preferably be cross-platform so that installer development can be done on Linux, Windows, or Mac.
  • Should preferably have a decent GUI for putting the installer together. Once that is done, however, it must be possible to skip the GUI and make installer building part of automated build process.


Edit: I posted a separate answer about what we ended up choosing and why.

A: 

I've seen several people recommend IzPack but I honestly do now know if it meets your requirements. It is at least free :)

willcodejavaforfood
A: 

you may be interested in launch4j

dfa
+2  A: 

I can vouch for izPack. It's Ant-based so you can package up an Ant install in it, and that Ant install can contain custom tasks, and/or scripts written within your Ant build.xml (e.g. using Groovy, Beanshell or any BSF-enabled scripting language). So it'll cover your customisable requirement.

I've used it in the past for all the above - unzipping/services/custom code. It's multi-platform, although I can't vouch for that specific instance above (64bit Windows). But if it runs Java, you should be fine.

The one headache is the JRE. You'd obviously require some JRE to run this. However I think you should be able to pack up and execute a specific JRE installation within izPack.

Brian Agnew
Thanks for the informative answer! IzPack seems really nice (especially its Ant integration and the fact that it's open-source and free), and something I might try in some future project. In this particular case, however, the fact that it needs a preinstalled JRE will probably rule it out (yeah, this wasn't explicitly stated in the question), as we'd prefer a self-sufficient .exe.
Jonik
We've run IzPack with an jar-exe-converter and a bundled JRE. It works.
Tim Williscroft
Stay FAR away from izPack if you're going to be customizing ANYTHING. The code and the structure is absolutely horrid and fragile, and has cost us tons of work for the few customizations we required...
Epaga
A: 

Sun offers an open source installer:

OpenInstaller

I'm sure that all your requested features are supported.
But it seems for me a little too hard to configure.

But guess what: It has not only a GUI but also a (pseudo-graphic) CLI.
Nice screenshots and info here.

ivan_ivanovich_ivanoff
Do you know of any actual projects that are using OpenInstaller? It seems a bit risky to go with OI as its so new and not much used...
Kaitsu
Well, it's from Sun. Sun doesn't create bad Java software usually ;)And it's unlikely that Sun will drop this project ;)Sorry, don't know for sure, but it seems that Netbeans uses openinstaller.
ivan_ivanovich_ivanoff
+2  A: 

We created BitRock InstallBuilder, a crossplatform installation tool after some frustrating experiences with InstallAnywhere and specially its cousin (now defunct) InstallShield MP. More than half of our clients use our tool to package Java-based software but the tool is native, not Java-based. That means we have a number of advantages such as native look and feel (incl. Vista, GTK, Qt, etc.) and no need to do self-extraction previous to installation (faster startup, less space requirements) to mention a couple. To answer your specific questions:

  • Supports calling Java code as part of the installation at multiple points in time (such as when a certain page is displayed, files being copied, at uninstall time, etc.). The code is not compiled in the installer, but it can be called externally and the result used in the installer. If you are more specific about which kind of code that you need I can provide specific sample code. We have a lot of built-in actions for functionality that needs to be manually added to other installers, so you may not need to write that code in the first place!
  • We support all versions of Windows, including 64bit and Windows 2008 (multiple customers have certified on those platforms using our installers)
  • We support bundled applications servers, including Tomcat, Resin, JBoss and others. Take a look at BitNami for examples of such stacks that we have created.
  • We support copying and moving files, substituting values in config files, unpacking files and most other common installation functionality. One of our principles is that the installer should provide built-in support for common installation actions and have an easy, clean interface for invoking external code that is specific to a client's product.
  • We support bundling JREs, as you mention is often enough just to bundle the JRE directory and setting the appropriate value for JAVA_HOME in the launching scripts

You can take a look at some of our customers such as MySQL, Samsung, Motorola, GitHub, etc. InstallBuilder is a commercial product, but we offer free licenses for open source projects and discounts for small business and microISVs.

Daniel Lopez
Thanks, that was very detailed. InstallBuilder made our short list of tools we're taking a closer look at. By the way, I was also interested in the downsides of each option, but perhaps someone else with less vested interest will have to tell about those... ;-)
Jonik
Good point :) I would say that if you need to generate Windows-only installers then there are many more Windows-specific alternatives out there that are comparable or better than any multiplatform installer. Also you mention that you had a preexisting codebase of Java-based extensions for InstallAnywhere. We like to think that our built-in functionality actually makes a lot of that code innecessary :) but if you need them, then the ability to heavily customize the installer in Java is an important factor to consider.
Daniel Lopez
+8  A: 

In this case, unfortunately, SO didn't tell us much that we didn't know already (and indeed the tool we ultimately chose was not mentioned in any answer). However, I'm posting our experiences here, as they might be helpful to others later on.

We (quickly) evaluated the following installer tools, mostly by looking at their websites and browsing for other information on the web: Actual Installer, Advanced Installer, BitRock InstallBuilder, Inno Setup, Install Creator, Installer VISE for Windows, InstallShield, install4j, IzPack, NSIS, openInstaller, Scriptlogic MSI Studio, Smart Install Maker, Symantec Wise Installation Studio, and WiX.

We screened out most of them early on, and ended up shortlisting two options for closer evaluation: BitRock InstallBuilder and install4j. For these tools, we downloaded evaluation versions and did some prototyping, to see if the things that are most important to us are really supported, and how easy or hard it is to get things working.

Both of the options were good in many things (and both seemed good alternatives to InstallAnywhere):

  • They produce completely native and pretty Windows .exe installers that are easy to customise with your own graphics etc.
  • Both tools could easily be automated so that installer building is triggered from Ant. (With install4j it literally took me just five minutes to learn it and then implement it.)
  • Both companies seem to have good support (well, at least for prospects evaluating their products ;-) Especially from BitRock we got very quick replies.

In the following things install4j seemed better than BitRock for our needs (many of these are subjective, of course, so YMMV):

  • install4j definitely has better support for running custom Java code - it can be done at any point during the installation, and regardless of whether there's any preinstalled JRE on the system.
  • BitRock uses a more hard-coded sequence of installation steps while install4j is more flexible. In install4j, adding custom screens and forms (with or without custom Java code), asking user for input, etc., can be done at any point, before or after installing any files.
  • Also some basic things like defining the filesets that are to be copied to the target system, and adding an installation step to replace certain strings in configuration files seemed somewhat easier in install4j.
  • install4j has better support for JRE bundling
  • When creating installers on Linux, the look & feel of install4j IDE was nicer (more "native") than that of BitRock
  • (install4j's licensing options were better for us - we strongly preferred a couple of floating licenses to named licenses for all developers or an expensive "site license")

So ultimately we went with install4j. Here are some more details on why it was impressive:

  • Its IDE, where you put the installer together, is very simple and easy to use - I could figure out how to do most things I wanted quickly, even without looking at documentation. And when I did have to check something in the documentation (e.g. how to refer to installer variables; how to get started writing custom Java code against the install4j API), it didn't take long to find what I needed.
  • You can completely customise the screens and actions during the installation procedure, and also add custom screens and actions (coded against their Java API) at any point. This was important to us because we need to reuse existing custom Java code from the old InstallAnywhere installer.
  • In some small details, install4j seems ideal for Java developers. For example, if you want to add a validation script to check some user input, you can code that very quickly in the install4j IDE itself, using plain old Java, with coding assistance resembling that of IntelliJ IDEA.
  • We deemed the cost of install4j floating licenses reasonable, considering how good the tool is (and downright bargain compared to the inflated pricing of InstallAnywhere...)
  • In short, it seemed like the best installer tool available for deploying Java applications.
Jonik
A: 

Jonik, thanks for posting such detailed feedback of your experience. I wanted to write a follow up answer, since you raise some good points.

After certain base requirements are met (which unfortunately InstallAnywhere does not any more) there are not really 'bad' or 'good' tools, but rather tools that are better suited for some projects. It seems you studied carefully all options and install4j will work better for your project. This is probably a good choice, since you have an existing Java codebase from your previous installer that you want to reuse (though I would like to think some of that code would not be necessary with InstallBuilder :)

Regarding InstallBuilder, we support customizing the screen sequence using the <insertBefore> tag (we probably should better document this). It is also straightforward to bundle a JRE (just including the java/ folder in most cases) but I think your criticism is valid: since this is a common task we should do a better job at documenting / making it accessible though the GUI, including drag-and-drop in all supported platforms. We already have in our roadmap improving the GUI in the areas you mention. The funny thing is that a lot of our customers find the XML format so easy to use that they prefer editing it using their programming editors (as if they were editing HTML)

Finally, regarding licensing, our current model does not require purchasing additional licenses if those extra programmers will just be building the installers (not designing them) or purchasing extra licenses for build or continuous integration machines. In any case, a couple of floating licenses for install4j are more expensive than a full Enterprise Site license for BitRock:)

Thanks again for the feedback

Daniel Lopez
You're right - and I'm sure your product would be great choice for many projects.But about licenses - no, they weren't more expensive (install4j Windows Edition floating licenses, incl. support: €1476 / piece vs. InstallBuilder Enterprise Site license: $6995 for up to 5 developers, according to your website. Plus, we have more than 5 developers! (And yes, they need to be able design the installer.) install4j's licensing model was clearly better for us, at this point. But the case is closed, so no use arguing. :-) (As we discussed, maybe you should indeed start offering floating licenses.)
Jonik
That is indeed the price for the Enterprise license (support for all platforms). Pricing for a site license for a single platform or professional edition (Win, Linux, Mac) is significantly lower. I apologize, I am not trying to argue :) just wanted to mention it here in case others are interested as well as those versions are not currently advertised in the website.
Daniel Lopez
Oh, okay. You seriously should communicate your pricing better (on your website) in that case.
Jonik
Professional site pricing added to the purchase page. Thanks again for pointing this out.
Daniel Lopez
+1  A: 

Deployment in an multi-platform environment is always a big source of troubles. It think that the optimum solution would target the creation of native packages for all platforms, like RPM, DEB or MSI ... the ones that could be installed unattended also.

Developers should work on making the application self-healing and run without installation.

Doing so will payoff in minimize the deployment efforts.

I know this is not quite a solution as you where asking but sometimes you may get better results this way.

Remember that you'll get free updating service on Linux if you follow these.

I still hope Microsoft will add something similar to MSI (and that would not require you to register at them). Meanwhile for Windows you can take a look at Google Updater just released as open source - http://code.google.com/p/omaha/

They released a similar product for Mac OS http://code.google.com/p/update-engine/ but sad that they didn't think about creating one product from these two.

Sorin Sbarnea
A: 

Hello there! I recommend having a look at cmInstall, which can be found at http://sourceforge.net/projects/cminstall/

It meets almost all your requirements and it's open source. Plus I'm one its developers :).

  1. [yes] Must support running custom Java code as part of installation procedure
  2. [yes] Must support Windows, including latest 64-bit versions like Windows Server 2008; support for other target operating systems is a plus
  3. [can be easily done by using 3rd party libs- e.g.:Tanuki Software] Must be able to install a bundled application server (such as Resin or Tomcat) as a service on Windows
  4. [yes]Must support basic stuff like copying and moving files around, editing configuration files, extracting ZIPs, etc.
  5. [yes - or you can programatically download & unzip it ]Must support bundling a specific version of JRE; at the very least by including a ZIP to be extracted

    6.[no - it needs jdk 1.6 installed, support for .exe or .msi is planned for future]Preferably does not depend on a preinstalled JRE (or any other 3rd party runtime environment or library) on target machine; in other words, can produce an independent Windows .exe (or .msi)

  6. [yes] The tool should preferably be cross-platform so that installer development can be done on Linux, Windows, or Mac.

    7.[no - the cminstall framework is "developer based" - but easy to use.Just read the tutorials from http://sourceforge.net/project/showfiles.php?group_id=250019&amp;package_id=305489 and see how easy it is to build an installer!] Should preferably have a decent GUI for putting the installer together. Once that is done, however, it must be possible to skip the GUI and make installer building part of automated build process.

Flueras Bogdan