'I can't find the javac for versions other than java17

I have installed multiple versions of java on my Linux mint mate 20. I can find the multiple Java versions. But I can't find the multiple javac versions, javac is only present for Java 17.

I have installed all the Java version using sudo apt-get install openjdk-x-jdk, where x is the the Java version.

This is the log of sudo update-alternatives --config java

There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-17-openjdk-amd64/bin/java      1711      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
* 2            /usr/lib/jvm/java-17-openjdk-amd64/bin/java      1711      manual mode
  3            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 

This is the log of sudo update-alternatives --config javac

atul@mintMate:~$ sudo update-alternatives --config javac
There is only one alternative in link group javac (providing /usr/bin/javac): /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
Nothing to configure.
atul@mintMate:~$ 

This is my terminal log

atul@mintMate:~$ java -version
openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment (build 17.0.1+12-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 17.0.1+12-Ubuntu-120.04, mixed mode, sharing)
atul@mintMate:~$ javac -version
javac 17.0.1

Is there a way to install or locate javac in the openjdk-amd64/bin/ folder. As I have already tried to look for them manually using the tree command.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source