Free. Open Source. Freshly Brewed!
Learn MoreSupported on macOS, Linux, and Windows.
Debian-based and RPM-based installers are available at packages.microsoft.com. Replace {version}
with your specific distribution.
This section describes how to install Microsoft Build of OpenJDK on a Debian-based operating system.
Open a terminal and run the following commands:
wget https://packages.microsoft.com/config/ubuntu/{version}/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
After the repository is added, you can install Microsoft Build of OpenJDK by running the following commands:
sudo apt install apt-transport-https
sudo apt update
sudo apt install msopenjdk-11
Open a terminal and run the following commands:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/debian/9/prod.list -O /etc/apt/sources.list.d/microsoft-prod.list
After the repository is added, you can install Microsoft Build of OpenJDK by running the following commands:
sudo apt install apt-transport-https
sudo apt update
sudo apt install msopenjdk-11
Open a terminal and run the following commands:
wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
After the repository is added, you can install Microsoft Build of OpenJDK by running the following commands:
sudo apt update
sudo apt install msopenjdk-11
If you have several versions of OpenJDK installed on your system then use the following command to set the Microsoft Build of OpenJDK as default:
sudo update-java-alternatives --set msopenjdk-11-amd64
This section describes how to install Microsoft Build of OpenJDK on a RPM-based operating system.
Open a terminal and run the following command:
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
After the repository is added, you can install Microsoft Build of OpenJDK by running the following command:
sudo yum install msopenjdk-11
Please do send us your comments, thoughts, and ideas to help us improve this. Visit our GitHub page to send us your feedback.
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.