46

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.
Jonik
  • 80,077
  • 70
  • 264
  • 372

13 Answers13

60

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.
Matthew Steven Monkan
  • 8,170
  • 4
  • 53
  • 71
Jonik
  • 80,077
  • 70
  • 264
  • 372
  • Install4j downsides: Can't have a simultaneous 32-bit and 64-bit installer under windows. Install4j saves found JREs in ~/.install4j ; if that file becomes corrupt or your JREs change - fail. – pjz Dec 01 '11 at 21:40
  • Wanted to add that the latest versions of InstallBuilder include improved JRE bundling and launcher creation support – Daniel Lopez Jan 10 '12 at 13:56
  • @Jonik , Sir can u provide steps, how to build installer for an ant based application. – Jitendra Khedar Oct 22 '13 at 04:54
  • @JitendraKhedar: If you're using install4j, [this guide](http://resources.ej-technologies.com/install4j/help/doc/indexRedirect.html?http&&&resources.ej-technologies.com/install4j/help/doc/cli/ant.html) instructs how to automate your installer build with Ant. Other than that, I suggest you post new SO questions about specific problems you encounter. – Jonik Oct 22 '13 at 05:50
  • @Jonik I know this is several years later, but your link in the above comment is 404'd now. – Kevin Welker Apr 03 '18 at 21:18
  • @KevinWelker the guide for building with ant is probably [here](http://resources.ej-technologies.com/install4j/help/doc/cli/ant.html). – Pixelstix Jun 07 '18 at 16:03
  • Downside with Bitrock Installer, it doesn't support signing the java launchers. Uninstaller doesn't get signed, though you can work around that. – CamHart Jun 06 '19 at 10:29
9

Just want to add that my company has used InstallAnywhere for about 6 years but we have decided to move on. The reason is two fold.

First of all their pricing is absolute highway robbery and the licensing is severely restrictive compared to direct competitors like INstall4J and BitRock.

My other problem with InstallAnywhere is the product is only minimally maintained. I have been using the product for 6-7 years through many different versions and bugs are rarely fixed and you surely can't expect new features. Essentially all you can expect is that they will add support for the new version of windows/mac as it comes out. Their support charges are quite pricey, but I have never had a support request actually implemented. When I first bought the product I believe it was from a company called ZeroG who were focused solely on this product. They actually maintained and improved the product. Back then it was the only real ticket and they were leaps and bounds above the competition.

Then it was acquired by Macrovision and then Flexera. Ever since ZeroG sold the product it has been an ancillary product for the owning company and the focus on it has been poor. It seems like it was bought more to complete a suite of products rather than because the company actually wanted to maintain the product.

Word of caution, evaluate these products carefully because you can become tied to them. We would have left the product sooner, but we put so much effort into not just the installer, but setting up an automatic update scheme based on the features/limitation of the product that it is expensive to leave the product because of the labor investment to reproduce this in a new product.

Just my take, but I wouldn't recommend InstallAnywhere.

springcorn
  • 611
  • 2
  • 15
  • 28
  • 1
    Yep, that pretty much matches our InstallAnywhere experiences (at the company where I worked when asking the question). Probably at some point it's been an innovative, top of the line product, later devolving into a cash cow that you certainly don't want to be tied to. – Jonik Oct 19 '13 at 02:53
9

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
  • 3,297
  • 2
  • 30
  • 29
  • 1
    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 Apr 18 '09 at 14:15
  • 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 Apr 25 '09 at 11:45
  • But you don't support signing java launchers.... I'm really conflicted right now. Just spent 16 hours learning/wiring everything up with BitRock to realize that. – CamHart Jun 06 '19 at 10:32
7

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
  • 268,207
  • 37
  • 334
  • 440
  • 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 Apr 18 '09 at 14:02
  • We've run IzPack with an jar-exe-converter and a bundled JRE. It works. – Tim Williscroft Mar 10 '10 at 01:30
  • 4
    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 May 28 '10 at 13:22
  • @Brian, Sir how to build installer using izpack, – Jitendra Khedar Oct 22 '13 at 05:05
4

Currently we are using GetDown to handle distribution of our swing applications. We use Tomcat to distribute updates and GetDown to download those updates. It's really flexible and powerful, and much better than java WebStart and because it produces check sum for changes it saves bandwith and downloads just changed files.

A good tutorial : http://www.hascode.com/2012/05/creating-updatable-java-applications-using-getdown-and-the-getdown-maven-plugin/

Project website : https://github.com/threerings/getdown

assylias
  • 321,522
  • 82
  • 660
  • 783
Mehdi
  • 4,396
  • 4
  • 29
  • 30
3

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
  • 161,544
  • 178
  • 535
  • 806
2

You can try the SetupBuilder Gradle Plugin to create a native *.msi installer with a simple Gradle build script.

  • It is free.
  • Supports 32 bit and 64 bit Windows. Also Linux and OSX.
  • Bundle the Java VM under Windows and OSX, does not required a preinstalled Java VM.
  • Can run Java Code before or after the installation.
  • Can create a windows service/daemon.
  • Has not a GUI but use Gradle. If you already use Gradle as build script language then it is very easy.
Horcrux7
  • 23,758
  • 21
  • 98
  • 156
2

I have also reveiwed few of the open source multi platform installers. Here is my comment:

  1. BitRock InstallBuilder: Only Great for free and open source developers as it gives free license for use in open source projects.
  2. InstallJammer: Good free and open source multi platform installer. Only one concern that as soon as one downloads the executable build from InstallJammer, the anti-virus program will immediately delete it. Somehow files built from InstallJammer are being caught as False Positives. You will have to work a bit more security certificate before publishing.
  3. Izpack: Good free and open source multi platform installer. It may be a bit cumbersome for people not used to with ant. May be great when used with GUI front-ends like PackJacket.
Manisha
  • 157
  • 1
  • 4
1

you may be interested in launch4j

dfa
  • 114,442
  • 31
  • 189
  • 228
1

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
  • 3,297
  • 2
  • 30
  • 29
  • 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 Apr 25 '09 at 15:30
  • 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 Apr 25 '09 at 18:43
  • Oh, okay. You seriously should communicate your pricing better (on your website) in that case. – Jonik Apr 25 '09 at 19:06
  • Professional site pricing added to the purchase page. Thanks again for pointing this out. – Daniel Lopez Apr 28 '09 at 09:28
1

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&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
  • 9,187
  • 8
  • 32
  • 30
0

I've seen several people recommend IzPack, but I honestly don't know if it meets your requirements. It's at least free :)

Rob
  • 5,223
  • 5
  • 41
  • 62
willcodejavaforfood
  • 43,223
  • 17
  • 81
  • 111
0

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.

Kounavi
  • 1,090
  • 1
  • 12
  • 24
ivan_ivanovich_ivanoff
  • 19,113
  • 27
  • 81
  • 100
  • 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 Apr 17 '09 at 19:01
  • 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 Apr 17 '09 at 21:01