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.comNeed help with installing java17
ubuntu - Where is 'javac' in java-17-openjdk-amd64? - Stack Overflow
How to install Java?
how to install java 17 on debian 9?
Videos
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.
RHEL/RockyLinux/CentOs/AlmaLinux etc: javac is in "devel" package
dnf -y install java-17-openjdk
dnf -y install java-17-openjdk-devel
Then set default versions
alternatives --config java
alternatives --config javac
I'm unsure which directions I used to install Open JDK before, but I followed the following instructions to remove and re-install: https://www.linuxcapable.com/how-to-install-openjdk-17-on-ubuntu-20-04/
I now have 'javac' in java-17-openjdk-amd64/bin.
Whew.