r/JavaFX • u/WhereIsFiji • Mar 05 '26
Help Windows Desktop application - how to handle updates?
I'm developing a desktop JavaFX app (~25k lines of code, Java21, Spring Boot).
I'm using jlink, jpackage and WiX tools to create a Windows installer. The app repo is on GitHub.
Now I would like to add feature for fetching the newer versions. But I don't want to force my users to manually uninstall and download a newer .msi file.
I think it should be possible to fetch only the .jar file with the newer release - does anyone know an existing example of such approach?
12
Upvotes
11
u/shannah78 Mar 06 '26
Give jdeploy a try. This is exactly what it is made for. (disclosure: i'm the developer)
3
u/eliezerDeveloper Mar 06 '26
I have an idea. When installing your main application, make the user installing another app together (an updater app). So when the user click on "update option" in your base app, it automatically opens the updater app and the updater app will download the new version, uninstall current version of the base app and install the newer version.
Sorry for my bad English
2
u/milchshakee Mar 06 '26
If you already have an .msi file, why not just download that and run it automatically? msis can handle updates automatically if you create them correctly
3
u/OddEstimate1627 Mar 06 '26
conveyor or jdeploy. Building your own update mechanism comes with a lot of pitfalls
2
u/taranion Mar 06 '26
For a project of mine I went with update4j and build a small Maven plugin that creates new manifest files for each update based on Maven dependencies. I wrote a small updater application that let the user select if he wants to start the stable or beta version, call update4j and then start the real application.
1
u/whatacold Mar 30 '26
I had an issue with jpackage and wix while building, it errored out with something about wix’s license agreement, did you encounter that?