Site icon installvirtual

How to install Java 17 on Ubuntu

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

 

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

Press enter when it tells you.
again update the system with this command
sudo apt update -y
This might take a while.
Now let’s install java
sudo apt install oracle-java17-installer
This might also take a few minutes to install java.
Type yes when it asks for accepting terms and conditions.

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!

Buy me a coffee

 

Source: OpenJDK

Exit mobile version