$ sudo apt-get update & apt-get -y install openjdk-17-jdk Sudo apt-get update & apt-get -y install openjdk-17-jdk To install Java on Ubuntu, use the apt-get command: In this tutorial, you will install OpenJDK, use it, and learn how to switch between different installed versions.Īt the time of writing this tutorial, the latest LTS release of Java was 17.x and the last GA release was 18.x. This is the open source version but there are many licensed versions provided by a variety of vendors (Oracle, Microsoft, AWS, …). If you need help setting up a Public Cloud instance with Ubuntu 22.04, follow the guide to use an OVHcloud Compute Instance.
You should also have basic knowledge of the command line. This tutorial assumes that you have a VPS, bare metal server, or as in our case, an OVHcloud Compute Instance running Ubuntu 22.04.
In this tutorial you will learn how to install the Java Development Kit (JDK) on a Ubuntu 22.04 Linux distribution. To learn more about the full capabilities of the Java language refer to the official documentation. Its wide adoption over the past years makes it an unavoidable language in the development world. Java is one of the most famous programming languages in the world.