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

- 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.


- 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

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!
