

OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1) It would return the output – openjdk version "11.0.7" Next, to install OpenJDK Java Runtime Environment v1.8.0_252 – sudo apt install openjdk-8-jre Change default Java version in Ubuntu 20.04 LTSįirst, verify for the Java version installed – java -version Now, to install OpenJDK Development Kit v11.0.7 – sudo apt install openjdk-11-jdk Hence, issue the following in terminal – sudo apt update Therefore, first update the Ubuntu repository to make the latest version of the package available. Since the packages are already available in standard Ubuntu repository. Install different versions of OpenJDK Development Kit and Java Runtime Environment In case you don’t have one, then contact your System Administrator for assistance. Note: Following operations would require you to have superuser privileges. Thereafter, we would issue the specific command to change the default version of Java. Just for clarity, we would first install OpenJDK Development Kit v11.0.7 and OpenJDK Java Runtime Environment v1.0.8_252. So, in this article we would discuss how to change the default Java version in Ubuntu 20.04 LTS. In that case, the default version would still be the one which we have installed earlier i.e.

Now, consider a scenario wherein we have also installed version 8 of OpenJDK JRE. As you would notice, we have already installed version 11 of OpenJDK JRE / JDK in Ubuntu 20.04 LTS release. We consider this article to be an extension to the previous article – Install OpenJDK JRE / JDK in Ubuntu 20.04 LTS.
