


I hope you have learned how to install Java JDK 17 on Ubuntu 22.04. Java HotSpot(TM) 64-Bit Server VM (build 17.0.3+8-LTS-111, mixed mode, sharing) Conclusion For example, change the default Java version, run the. We can use symbolic links to setup the default Java version. For example, here I am going to install OpenJDK 11: sudo apt install openjdk-11-jdk. It allows us to run different apps as per the Java version. Java(TM) SE Runtime Environment (build 17.0.3+8-LTS-111) We can install multiple versions on Ubuntu. sudo update-alternatives -install /usr/bin/java java /usr/lib/jvm/jdk-17/bin/java 1 Verify Java JDK InstallationĪfter installing JDK, use the below command to verify the version. In some cases, you may need to install Oracle JDK 17 on the PATH location. wget įinally, install Oracle Java JDK 17 using the dpkg command. Then, download Oracle Java JDK 17 using the wget command in the terminal. OpenJDK 17 JRE sudo apt install -y openjdk-17-jre Install Oracle JDK 17 On Ubuntu 22.04įirst, install dependencies for Oracle JDK 17 installation. OpenJDK 17 JDK sudo apt install -y openjdk-17-jdk Then, install the OpenJDK or JRE package as per the requirement. OpenJDK has separate packages for JDK (Java Development Kit) for developing Java applications and JRE (Java Runtime Environment) for running Java applications.įirst, update the repository index. Here, we will see how to install Java JDK 17 on Ubuntu 22.04. This newest release includes JDK 17, which provides an environment for building applications using the Java programing language, testing, and running the Java programs. Java 17 LTS is the latest long-term support release for the Java SE platform.
