Quick revision
The short answer
I would build on a CI matrix with a Windows and a macOS runner, because jpackage cannot cross-build, and sign everything: Authenticode for the Windows launcher and installer, and a Developer ID signature plus Apple notarization on macOS so Gatekeeper accepts the app. For updates, jpackage has nothing built in, so I would ship through the company's device management, such as Intune and Jamf, or an update framework, with a stable --win-upgrade-uuid so each new installer replaces the old one. I would keep the runtime small with jlink, plan JDK security updates into releases, and ask honestly whether a web application would serve frequently changing needs better.
What to remember
In this answer, we set up a proper desktop release: a CI matrix with one runner per operating system, Authenticode signing of the launcher and msi on Windows, Developer ID signing with notarization and stapling on macOS, and a fixed upgrade code with increasing versions so installers replace old ones. Distribution goes through Intune and Jamf or an update framework, settings live in the user profile so they survive upgrades, the jlink runtime is patched every JDK security release, and we keep asking whether a web application would serve the users better.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would build on a CI matrix with a Windows and a macOS runner, because jpackage cannot cross-build, and sign everything: Authenticode for the Windows launcher and installer, and a Developer ID signature plus Apple notarization on macOS so Gatekeeper accepts the app. For updates, jpackage has nothing built in, so I would ship through the company's device management, such as Intune and Jamf, or an update framework, with a stable --win-upgrade-uuid so each new installer replaces the old one. I would keep the runtime small with jlink, plan JDK security updates into releases, and ask honestly whether a web application would serve frequently changing needs better.
Why this question is asked
Internal desktop tools often start as one developer's side project and grow until thousands of people depend on them. The symptoms in this question, security warnings and painful reinstalls, are what happens when packaging and distribution were never designed. Interviewers ask it to see whether we know what signing, notarization and upgrade identifiers actually do. In this answer, we will see why the warnings appear, set up the build matrix, sign on both platforms, design updates that replace old versions cleanly, and decide how to handle the bundled runtime.
1Why Users See Security Warnings
Operating systems trust software through code signing: the publisher signs the file with a certificate from a trusted authority, and the system checks the signature before running it. An unsigned installer on Windows triggers SmartScreen's warning that the app is from an unknown publisher. On macOS, Gatekeeper goes further: an app that is not signed with an Apple Developer ID and notarized by Apple is blocked by default, and users must find a workaround in System Settings.
Training 3,000 employees to click past security warnings is the wrong lesson to teach, and security teams rightly dislike it. So signing is not polish; it is part of the release.
2A CI Matrix, One Runner per Operating System
jpackage drives each platform's native tools, so the Windows installer must be built on Windows and the macOS package on macOS. We set up one pipeline with a matrix, and each runner does the same steps: build the jars, create the runtime with jlink including the JavaFX modules from the JavaFX jmods for that platform, run jpackage, sign, and publish. The signing keys live in the CI secret store or a hardware-backed signing service, never on developer laptops.
- Build jars and run testsOnce, platform independent
- Windows runnerjlink, jpackage app-image, sign exe, build msi, sign msi
- macOS runnerjlink, jpackage with --mac-sign, notarize, staple
- PublishUpload to Intune and Jamf, or the update server
- Staged rolloutPilot group first, then everyone
5 steps in order. Play them, or step through them one at a time.
3Signing on Windows and macOS
On Windows, the launcher executable inside the application and the installer both need an Authenticode signature. jpackage does not sign Windows output itself, so we create the app-image first, sign its exe with signtool, then build the msi from that folder and sign the msi. On macOS, jpackage can sign directly with the --mac-sign options, using a Developer ID Application certificate; the app is then sent to Apple's notary service and the ticket is stapled to it so Gatekeeper can check it offline.
Notice the timestamp server in the Windows commands. A timestamp proves the file was signed while the certificate was valid, so the signature still verifies after the certificate expires. On macOS, the bundled runtime's native libraries must be signed too, and the app needs the hardened runtime; jpackage handles this when --mac-sign is used, but check your version and test on a clean Mac.
4Updates Without Full Reinstalls
jpackage builds one installer for one version and has no auto-update. On Windows, an msi decides whether it is a new product or an upgrade of an installed one using the upgrade code. If every build gets a random upgrade code, Windows installs side by side or refuses, and users have to uninstall first. Setting a fixed --win-upgrade-uuid and increasing --app-version on each release makes the new msi replace the old one in place.
For delivery, the simplest reliable channel at a company is the device management it already has: Intune for Windows and Jamf for macOS can push a new version to 3,000 machines silently, in rings, without users doing anything. If the tool must update itself, we can add an update framework that checks a release feed and downloads the new signed installer. Either way, a bug fix becomes a pushed update rather than a support ticket.
5The Bundled Runtime and the Bigger Question
Each installer contains its own Java runtime, so it is our job to patch it. We build the runtime with jlink from a supported JDK release, keep it small, and schedule a release after each quarterly JDK security update even if the tool itself has not changed. The pipeline makes that cheap: bump the JDK version, rebuild, sign, publish.
Finally, it is worth asking whether this should be a desktop tool at all. If it changes weekly, needs no local hardware or files, and runs on two platforms, a web application deployed once on a server would remove signing, installers and runtime patching entirely. Desktop makes sense when the tool needs offline work, local devices or heavy local processing.
6Follow-up questions
What happens to user settings during an upgrade?
An msi or pkg upgrade replaces the installation folder, so anything stored there is lost. Settings must live in the user's profile: under %APPDATA% on Windows and ~/Library/Application Support on macOS, or through java.util.prefs.Preferences, which uses the registry on Windows and plist files on macOS. Those locations survive upgrades. We should also version the settings format so a new release can migrate old settings, and test an upgrade from the previous version, not only a fresh install, in the pipeline.
Can we sign once for both platforms?
No. Windows uses Authenticode certificates from a public certificate authority, while macOS requires an Apple Developer ID certificate tied to the company's Apple developer account. Each runner signs with its own platform's identity.
Should the installer be per-user or per-machine?
Per-machine installs need administrator rights but are what device management usually deploys. Per-user installs, with --win-per-user-install on Windows, avoid admin rights and suit self-service updates. For 3,000 managed machines, per-machine through Intune is usually simplest.
7Conclusion
In this answer, we set up a proper desktop release: a CI matrix with one runner per operating system, Authenticode signing of the launcher and msi on Windows, Developer ID signing with notarization and stapling on macOS, and a fixed upgrade code with increasing versions so installers replace old ones. Distribution goes through Intune and Jamf or an update framework, settings live in the user profile so they survive upgrades, the jlink runtime is patched every JDK security release, and we keep asking whether a web application would serve the users better.
Open with
The warnings and reinstalls tell me packaging was never designed, so I would set it up as a proper release pipeline. First, a CI matrix with a Windows and a macOS runner, because jpackage uses each platform's native tools and cannot cross-build.
Then, if they want more
Each runner builds a small runtime with jlink, including the JavaFX jmods for that platform, and runs jpackage. Second, signing. On Windows I create an app-image, sign the launcher exe with Authenticode and a timestamp, build the msi from that folder and sign the msi.
On macOS I use --mac-sign with our Developer ID, then notarize with notarytool and staple the ticket, so Gatekeeper lets it run. The keys stay in the CI secret store.
Third, updates. jpackage has no auto-update, so I set a fixed --win-upgrade-uuid and increase --app-version every release, which makes a new msi replace the old version in place, and I distribute through Intune and Jamf in rings, so fixes arrive silently. User settings must live in the user profile, not the install folder, so they survive upgrades.
Fourth, the runtime is ours to patch, so every quarterly JDK security update triggers a rebuild. And I would ask whether a web app would suit better if it changes often and needs nothing local.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- The Java Language Specification, Java SE 21, Java SE 21 API documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Your team ships a JavaFX desktop tool to 3,000 employees on Windows and macOS using...": https://scrivio-interview-library.netlify.app/java/modules/27790023f5/