sudo apt update && sudo apt upgrade -y
This command is used in Ubuntu or other Debian-based Linux distributions to update the package lists for upgrades and then upgrade the installed packages.
sudo apt install openjdk-11-jdk
This command installs the OpenJDK 11 development kit, which includes the Java Development Kit (JDK) necessary for developing Java applications.
java --version
This command is used to check the version of Java installed on the system. It should display information about the installed Java version, including the version number and other relevant details.
You can also download jdk version for Mac, Windows or Linux as per your requirement from following link : https://learn.microsoft.com/en-us/java/openjdk/download
Leave a Reply