install java on ubuntu code example
Example 1: install openjdk 8 sdk on ubuntu
sudo apt-get install openjdk-8-jdk
Example 2: install java ubuntu
sudo apt install default-jdk
Example 3: install java ubuntu
sudo apt install default-jre
sudo apt install default-jdk
Example 4: install java ubuntu
sudo apt install default-jre
Example 5: install java ubuntu
sudo apt install openjdk-11-jre-headless -y
sudo apt install default-jre -y
sudo apt install openjdk-8-jre-headless -y
sudo apt install openjdk-13-jre-headless -y
sudo apt install openjdk-14-jre-headless -y
Example 6: where is java installed in ubuntu
readlink -f $(which java)