Skip to content

Install Java OpenJDK 17

There are several ways to install Java OpenJDK 17 on a Debian-based system, such as Ubuntu. One of the most straightforward methods is to use the terminal. Here’s how you can do it:

  1. Update apt package

    Bash
    sudo apt update
    

  2. Install OpenJDK and JRE 17

    Bash
    sudo apt-get install openjdk-17-jdk openjdk-17-jre -y
    

  3. Check Java Version

    Bash
    java -version