How to Install Java 17 in Ubuntu 20.04, 21.10, Linux Mint 20

2 min

A quick guide on how to install the latest Java 17 in Ubuntu 20.04, 20.10 and Linux Mint 20.x.

Oracle announced the release of Java 17 which is the LTS version of this widely used programming language. This release gets support for 8-years that includes security and performance updates, and of-course bug fixes. Java 17 is officially supported until 2029.

Although this guide tested for ongoing supported Ubuntu, and Linux Mint release, however, should be applicable for other Debian based distributions as well in coming days. Because the PPA that is used in this guide, is periodically updated to meet the needs for past and future releases.

Installing Java 17 is not that straightforward without a PPA. Because it’s a license product, and you don’t get it in the Ubuntu official repo. There are other alternatives to Oracle Java such as OpenJDK which is easier to install. But they lack certain functionalities due to terms and conditions from Oracle and may not suitable for your needs.

Install Java 17 in Ubuntu, Linux Mint

  • Open terminal.
  • Add the following PPA.
sudo add-apt-repository ppa:linuxuprising/java
  • Refresh your system and install Java 17 using the following command.
sudo apt-get update
sudo apt-get install oracle-java17-installer oracle-java17-set-default
Java 17 install in Ubuntu and Mint
Java 17 install in Ubuntu and Mint
  • This command will directly download the latest Java 17 from the Oracle website. Wait till the download and installation to complete.
  • During installation, you need to Accept certain usage terms of Oracle for completion.
Terms and Conditions 1
Terms and Conditions 1
Terms and Conditions 2
Terms and Conditions 2
  • After completion, type below to check the Java version.
java --version
  • You should see Java 17 in the prompt. You can also check out the Java executable path via the below command:
which java
Java version 17 installed
Java version 17 installed

Now, if you are using Arch Linux or its derivatives like Manjaro – you can install Oracle Java 17 using AUR. You can refer to our guide on how to install Oracle Java 17 in Arch Linux here. The AUR package is updated with the latest version 17.

So, that’s about it. You can now work with your Java programming or projects for your development work.

We bring the latest tech, software news and stuff that matters. Stay in touch via Telegram, Twitter, YouTube, and Facebook and never miss an update!

Join our Telegram channel and stay informed on the move.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.


Creator of All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Oldest Most Voted
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x