How to install Java on Ubuntu
kodingwindow@kw:~$ sudo apt -y install openjdk-21-jre openjdk-21-jdk
...
root@kw:/home/kodingwindow# java --version
openjdk 21.0.3 2024-04-16
OpenJDK Runtime Environment (build 21.0.3+9-Ubuntu-1ubuntu1)
OpenJDK 64-Bit Server VM (build 21.0.3+9-Ubuntu-1ubuntu1, mixed mode, sharing)
Advertisement