Install Java 17 on Ubuntu
In this tutorial, I will show you how to install Java 17 on Ubuntu. The Java Development Kit (JDK) is a software development environment used for developing Java applications and applets. It includes the Java Runtime Environment (JRE), an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (Javadoc), and other tools needed in Java development.
1. Pre-requisites
- Ubuntu installed with root access
Read Also: How to install openjdk 16 on Ubuntu
Install Java 17
Here we will use apt to install Java on Ubuntu
1. Update the system
sudo apt update -y
2. Add repository
sudo add-apt-repository ppa:linuxuprising/java
sudo apt update -y
sudo apt install oracle-java17-installer
2. Check java Version
Now after installing open JDK check the version using the following command
$ java -version
java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
Read Also: How to install Java 11 on CentOS 7
If you have any issues using this tutorial please feel free to comment below.
If you like this tutorial please consider buying me a coffee!
Source: OpenJDK