Java: To bundle or not

Duke WavingIntroduction

As every Java application developer knows, in order for your users to use your application, they need a Java Runtime Environment (JRE) on their computer. Traditionally, this was done by providing the user with instructions on how to download and install a JRE (or check if they have he correct JRE), prior to installing your software. In recent years, particularly with the gaining popularity of JavaFX, and because of Mac App Store requirements, the trend has been moving towards bundling a JRE with your application. As a Java developer, I’ve been debating this in my mind, and can see both pros and cons of bundling a JRE.

Pros of bundling a JRE

Bundling a JRE, basically means that your application includes its own JRE, that gets installed, along with your application; typically within the same folder (Windows) or within the app bundle (Mac). The biggest advantage to bundling, is that your users don’t need to worry about installing or managing JREs, and can just use your application. A second advantage is that you can better control which version of the JRE will be used with your application. Additionally, if you want to distribute your Java application on the Mac App Store, it needs to include a bundled JRE.

Cons of bundling a JRE

The biggest con of bundling a JRE, is that users won’t always being most current JRE available, when running your application. Oracle is currently releasing regular updates to Java 8 every 3 months, and so a user that installed your application a year ago, will have an outdated version of Java, and may be missing some important security fixes. The best solution for this is, to release updates your applications, with the latest JRE, every time Oracle makes an update; but this can become a little onerous and time-consuming and there is no guarantee the user will update the application. Another con, is that including a JRE greatly increases the download size of your application; although with current internet speeds this is becoming less of an issue. Finally, bundling a JRE also means the user will have many, possibly redundant, JREs sitting around on their computers. Again, with current hard drive sizes that probably isn’t too much of an issue, but it just doesn’t seem efficient.

Conclusion

I am still sitting on the fence with this, and currently release two version of my apps; one with a bundled JRE and one without. This can also be a pain, and so am considering moving to just bundling in the future. If anyone has any comments, or best practices that they use, I’d love to hear them.

Boxing Week Special

PWMinder on a Laptop ComputerFrom December 26, to December 31, 2016, PWMinder Desktop is available for 50% off the regular price. PWMinder Desktop is a password manager, that securely stores all of our various passwords. You can find more information in including features and purchase information, on the PWMinder Desktop home page. To purchase an activation code at 50% off, please visit our Store site.

Rail Baron Tools preview

Rail Baron Box

Rail Baron – Game of Building Railroad Empires

From the back of the game box:

You are living in the heyday of the locomotive. You are Jay Gould. And you have just added another railroad to your vast railroad empire. Flushed with success, you now retire to the splendor of your very own Pullman Palace Car. The dream ends. You awaken to reality with the though… “just another fantasy.” but for the grace of Avalon Hill, your dream continues.

If you have ever played the Rail Baron board game, you know that is great game to play with friends and family. The only frustration, is having to use the provided charts and tables, to look up your trip destinations and payoffs. To help make playing the game easier, and more fun, I am developing an iOS app called Rail Baron Tools.

Read more…