Preview Release
These binaries are in preview and are not recommended to be used in production.

Microsoft Build of OpenJDK

Free. Open Source. Freshly Brewed!

Learn More

Supported on macOS, Linux, and Windows.

Linux Installers for OpenJDK 11 Preview

Debian-based and RPM-based installers are available at packages.microsoft.com. Replace {version} with your specific distribution.


Install Microsoft Build of OpenJDK on Debian-Based Linux

This section describes how to install Microsoft Build of OpenJDK on a Debian-based operating system.

Ubuntu 18.04+

Open a terminal and run the following commands:


Terminal
                    
                    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:


Terminal
                    
                    sudo apt install apt-transport-https
                            sudo apt update
                            sudo apt install msopenjdk-11
                    
                    

Debian 9

Open a terminal and run the following commands:


Terminal
                    
                    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:


Terminal
                    
                    sudo apt install apt-transport-https
                            sudo apt update
                            sudo apt install msopenjdk-11
                    
                    

Debian 10

Open a terminal and run the following commands:


Terminal
                    
                    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:


Terminal
                    
                    sudo apt update
                            sudo apt install msopenjdk-11
                    
                    

Setting Microsoft Build of OpenJDK as default

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:


Terminal
                    
                    sudo update-java-alternatives --set msopenjdk-11-amd64
                    
                    

Install Microsoft Build of OpenJDK on RPM-Based Linux

This section describes how to install Microsoft Build of OpenJDK on a RPM-based operating system.

CentOS 7

Open a terminal and run the following command:


Terminal
                    
                    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:

Terminal
                    
                    sudo yum install msopenjdk-11
                        
                    

Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.