Wingetlywingetly
← Back to Microsoft Build of OpenJDK with Hotspot 21

Silent install command for Microsoft Build of OpenJDK with Hotspot 21 21.0.12.101

The exact silent switches the Microsoft Build of OpenJDK with Hotspot 21 installer accepts, plus a one-line command you can paste into a script, Intune Win32 app, or Configuration Manager package.

One-line silent install (x64, machine scope)
msiexec.exe /i microsoft-jdk-21.0.12.1-windows-x64.msi /quiet /norestart ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome

Run from the directory containing microsoft-jdk-21.0.12.1-windows-x64.msi. Download the installer from the Direct link below first. Run an elevated terminal (Run as Administrator) for machine-scope installs.

ArchitectureScopeTypeSilent switchesSource
x64machineMSI
WiX
Custom: ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome
Default for WiX (MSI)
arm64machineMSI
WiX
Custom: ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome
Default for WiX (MSI)
  • Declared by publisher means the switches come straight from the winget manifest the publisher (or community maintainer) submitted to microsoft/winget-pkgs.
  • Default for {type} means the manifest doesn't specify silent switches, so the framework's standard switches are shown (e.g. /S for NSIS, /quiet /norestart for MSI).

Frequently asked questions

What is the silent install command for Microsoft Build of OpenJDK with Hotspot 21?
Microsoft Build of OpenJDK with Hotspot 21 uses MSI (WiX). After downloading the installer, run: msiexec.exe /i microsoft-jdk-21.0.12.1-windows-x64.msi /quiet /norestart ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome. The silent install switches are /quiet /norestart.
How do I deploy Microsoft Build of OpenJDK with Hotspot 21 via Intune or Configuration Manager?
Use winget for the cleanest path: winget install --id Microsoft.OpenJDK.21 --exact 21.0.12.101 --silent --accept-package-agreements --accept-source-agreements. If winget isn't viable in your environment, package the publisher's installer directly using the silent switches above.

Prefer the winget route? See the full Microsoft Build of OpenJDK with Hotspot 21 install page.