To install Java on a Debian-based Linux distribution using apt
, you can follow these steps:
sudo apt-add-repository ppa:openjdk-r/ppa
sudo apt update
sudo apt install openjdk-11-jdk
sudo update-alternatives --config java
java -version
Note that these steps will install the OpenJDK version of Java 11. If you prefer to install the Oracle version of Java 11, you can download it from the Oracle website and install it manually.
For more information on installing Java on a Debian-based Linux distribution, you can refer to the OpenJDK documentation or the Oracle documentation.