The javac executable is not part of the openjdk-*-jdk packages. To install it, you need to install the openjdk-17-jdk-headless package:

sudo apt install openjdk-17-jdk-headless

To manage the active version, don't forget about the update-alternatives command:

sudo update-alternatives --config java
sudo update-alternatives --config javac
Answer from DynamicBits on askubuntu.com
๐ŸŒ
RoseHosting
rosehosting.com โ€บ home โ€บ how to install java 17 lts on ubuntu 20.04
How to Install Java 17 LTS on Ubuntu 20.04 | RoseHosting
October 5, 2022 - You will need to add the third-party repository in your system in order to install Oracle Java. First, install the required dependencies with the following command: ... You will see this installer window where you are supposed to agree to the ...
Discussions

Need help with installing java17
This is the guide for you: https://www.linuxuprising.com/2021/09/how-to-install-oracle-java-17-lts-on.html If it doesn't work, you should provide more info, specifically what exactly you type in console, and what error you're getting. More on reddit.com
๐ŸŒ r/Ubuntu
5
2
December 4, 2021
Ubuntu Java 17 openjdk java docs don't appear in IntelliJ - Stack Overflow
I can't get openjdk 17 JavaDocs to work in IntelliJ 2022.3.2 CE on Ubuntu 20.04. As soon as I switch to Internal IntelliJ Amazon Corretto 19 SDK - I see javadoc but for openjdk sdk 17 I see decompiled code instead. :~$ sudo apt install openjdk-17- openjdk-17-dbg openjdk-17-jdk openjdk-17-j... More on stackoverflow.com
๐ŸŒ stackoverflow.com
ubuntu - Where is 'javac' in java-17-openjdk-amd64? - Stack Overflow
How can I get the 'javac' command in openjdk 17.0.1, or how do I use that SDK to create a class? ... WSL makes no difference whatsoever -- it's downloading the same package used by any other Ubuntu. The important question is exactly which jdk package you installed. Use dpkg -l to show that, not java --version. (If it's not shown in dpkg, that tells us you didn't install it the Ubuntu way, which gives us a place to start on ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Getting Java error trying to run Server 1.17 on Ubuntu 20.04
  • Looking for instant support instead? Have a urgent question or just want to talk to the community without waiting? Join the r/minecraftserver Official Discord server https://discord.gg/bcbUzMYbsh

  • Get our most popular Ryzen 3000 and 5000 powered Minecraft Hosting plan packed with 8GB of RAM for only $15 a month! Find out more at https://mcserverhosting.net/

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

More on reddit.com
๐ŸŒ r/MinecraftServer
7
5
June 9, 2021
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ how-to-install-java-with-apt-on-ubuntu-22-04
How to Install Java with Apt on Ubuntu (JRE & JDK) | DigitalOcean
February 2, 2026 - To install the OpenJDK version of Java, first update your apt package index: ... OutputCommand 'java' not found, but can be installed with: sudo apt install default-jre # version 2:1.11-72build1, or sudo apt install openjdk-11-jre-headless # version 11.0.14+9-0ubuntu2 sudo apt install openjdk-17...
๐ŸŒ
Reddit
reddit.com โ€บ r/ubuntu โ€บ need help with installing java17
r/Ubuntu on Reddit: Need help with installing java17
December 4, 2021 -

For the last two days I've been cracking my head on attempting to install java17 on my ubuntu20.10 machine.

I need java17 to run the latest version of a minecraft server. The problem I'm encountering is the following:

I can add the ppa:linuxuprising/java repository succesfully. (this is the most common method of installing this version of java). The sudo apt update command succeeds as well.

However when I try to install java17 through this repository it keeps stating that the package can't be found, which is strange because in the web viewer of the same repository the packages are there.

I'm not very well versed in the linuxverse so any help would be welcome.

๐ŸŒ
Ubuntu
ubuntu.com โ€บ tutorials โ€บ install-jre
Install the Java Runtime Environment | Ubuntu
(Alternatively, you may opt to use a specific Java version, using for example the openjdk-11-jre package; as updates are released for that version of the Java Virtual Machine, that packages will be updated, allowing you to stick to the latest and greatest update of one specific version of the Java language.) ... openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2, mixed mode) (Although the output may change in the future as new Java versions are promoted to LTS status, or the current LTS version receives updates.) And thatโ€™s it! In the next step weโ€™ll install Oracle HotSpot JRE.
๐ŸŒ
Oracle
oracle.com โ€บ java โ€บ technologies โ€บ downloads
Download the Latest Java LTS Free
Download the Java including the latest version 17 LTS on the Java SE Platform. These downloads can be used for any purpose, at no cost, under the Java SE binary code license.
Find elsewhere
๐ŸŒ
OVHcloud
us.ovhcloud.com โ€บ home โ€บ how to install java on ubuntu 22.04 ?
How to install Java on Ubuntu 22.04 ?
To install Java on Ubuntu, the easiest way is to use apt-get command: sudo apt-get update && apt-get -y install openjdk-17-jdk
๐ŸŒ
ComfyUI
mslinn.com โ€บ blog โ€บ 2023 โ€บ 09 โ€บ 28 โ€บ jdk.html
Installing JDK 17 on Ubuntu
September 28, 2023 - $ apt show -a openjdk-17-jdk Package: openjdk-17-jdk Version: 17.0.8.1+1~us1-0ubuntu1~23.04 Priority: optional Section: java Source: openjdk-17 Origin: Ubuntu Maintainer: Ubuntu Developers ... Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1544 kB Provides: java-compiler, java-sdk (= 17), java10-sdk, java11-sdk, java12-sdk, java13-sdk, java14-sdk, java15-sdk, java16-sdk, java17-sdk, java2-sdk, java5-sdk, java6-sdk, java7-sdk, java8-sdk, java9-sdk Depends: openjdk-17-jre (= 17.0.8.1+1~us1-0ubuntu1~23.04), openjdk-17-jdk-headless (= 17.0.8.1+1~us1-0ubuntu1~23.04), libc6 (>= 2.3
๐ŸŒ
Se-education
se-education.org โ€บ guides โ€บ tutorials โ€บ javaInstallationLinux.html
Java 17 Installation Guide for Linux Users
This guide explains how to install the (specifically, OpenJDK Java 17) on Linux using the command line. This guide was created using Ubuntu 22.04 but the steps for other Debian based Linux distros should be similar.
๐ŸŒ
Ubuntu
ubuntu.com โ€บ developers โ€บ docs โ€บ reference โ€บ availability โ€บ java
Available Java versions - Ubuntu for Developers
2 days ago - This page lists Java versions available in Ubuntu releases, including CRaC and GraalVM. Ubuntu OpenJDK (deb) packages:,,, Ubuntu version, available Java versions, java-common version,,, 26.10 (Ston...
๐ŸŒ
Cherry Servers
cherryservers.com โ€บ home โ€บ blog โ€บ linux โ€บ how to install java on ubuntu 22.04 | step-by-step tutorial chatbots
How to Install Java on Ubuntu 22.04 | Step-by-Step Tutorial chatbots | Cherry Servers
November 7, 2025 - OpenJDK provides all the tools you need to develop Java-based applications and microservices, including the Java compiler, Java Runtime Environment (JRE), and Java class library. Ubuntu repositories provide the OpenJDK package by default, and you can search for its availability as shown. ... At the time of writing, the most recent release is OpenJDK 20. The latest LTS ( Long Term Support ) release is OpenJDK 17 and will be supported until 30 September 2026. To install OpenJDK 11 using the APT package manager, execute the command:
๐ŸŒ
Faun
faun.pub โ€บ how-to-install-and-manage-multiple-jdk-versions-on-ubuntu-22-04-3de225c7d8c8
How to Install and Manage Multiple JDK Versions on Ubuntu 22.04 | by Achini Udari Jayasena | FAUN.dev() ๐Ÿพ
November 1, 2024 - /usr/lib/jvm/java-11-openjdk-amd64 ... you set. Installing and managing multiple JDK versions on Ubuntu is simple using the `update-alternatives` tool....
๐ŸŒ
Azul Systems
azul.com โ€บ home โ€บ azul downloads
Java 8, 11, 17, 21, 25 Download for Linux, Windows and macOS
January 30, 2023 - Click here to download the Azul Zulu Builds of OpenJDK for Java 8, 11, 17, 21, 25 for Linux, Windows and macOS. Also download Azul Platform Prime.
๐ŸŒ
Contabo
contabo.com โ€บ home โ€บ how to install java on ubuntu 18.04, 20.04 & 22.04 using apt-get
How To Install Java on Ubuntu 18.04, 20.04 & 22.04 using Apt-Get
August 11, 2023 - In this comprehensive step-by-step guide you will learn how to install different versions of Java on your Ubuntu server using Apt-Get.
๐ŸŒ
Linuxize
linuxize.com โ€บ home โ€บ java โ€บ how to install java on ubuntu 24.04
How to Install Java on Ubuntu 24.04 | Linuxize
May 3, 2026 - Java 21 is the default Java version ... install another available version, replace the version number. For example, use openjdk-17-jdk for Java 17....
๐ŸŒ
LinuxCapable
linuxcapable.com โ€บ home โ€บ ubuntu โ€บ how to install openjdk 17 on ubuntu 26.04, 24.04 and 22.04
How to Install OpenJDK 17 on Ubuntu 26.04, 24.04 and 22.04 - LinuxCapable
April 29, 2026 - Install OpenJDK 17 on Ubuntu 26.04, 24.04 and 22.04 using APT. Covers JRE vs JDK, version management, JAVA_HOME setup, removal.
๐ŸŒ
BlueVPS
bluevps.com โ€บ blog โ€บ step-by-step guide: how to install java on ubuntu 22.04
Step-by-Step Guide: How to Install Java on Ubuntu 22.04 - Blog - BlueVPS
September 25, 2023 - Choose the suitable version of OpenJDK and install it using the apt repository. ... Now, press โ€˜yโ€™ and โ€˜Enterโ€™ to proceed with the installation. The above command will install the complete JDK platform of the OpenJDK 17 version.