SwitchHunt / catalog
Oracle JDK 21 - Silent Install Switch
The hand-curated silent install command for Oracle JDK 21 on Windows, plus its silent uninstall command - for unattended, quiet, fleet-wide deploys. Copy, paste, ship - smoke-test in a throwaway VM first.
Silent install command
msiexec /i "installer.msi" /qn /norestart Silent uninstall command
msiexec /x "installer.msi" /qn /norestart Replace installer.msi with the actual installer filename (or its full path).
Notes & gotchas
Check the licence on the exact update you package: Oracle offers JDK 21 free under its No-Fee Terms only for a year after the next LTS release, and later 21 updates move to the OTN licence, which is not free for production use. The Microsoft Build of OpenJDK installs the same way with no such terms.
Lab-tested
On 2026-10-20 we ran the install command above as SYSTEM (how deployment tools run it) on a Windows 11 VM against Oracle JDK 21 21.0.12, and confirmed the app showed up in Add/Remove Programs - not just that the installer exited 0. The uninstall command above then removed it. Vendors change installers between versions, so smoke-test a new one before you ship it fleet-wide.
FAQ
What is the silent install command for Oracle JDK 21?
Run: msiexec /i "installer.msi" /qn /norestart
How do I silently uninstall Oracle JDK 21?
Run: msiexec /x "installer.msi" /qn /norestart
Any gotchas installing Oracle JDK 21 unattended?
Check the licence on the exact update you package: Oracle offers JDK 21 free under its No-Fee Terms only for a year after the next LTS release, and later 21 updates move to the OTN licence, which is not free for production use. The Microsoft Build of OpenJDK installs the same way with no such terms.
Got a different installer, or one that isn't in this list? Drop it into SwitchHunt and it reads the silent switches right in your browser, nothing uploaded.