![]() ![]() ![]() Make sure to change the package name accordingly! Setup JAVA_HOME Environment Once done, you can easily install the downloaded deb package: sudo apt install. It is all up to you and I will be using wget to download the package: wget You may copy the link and download it via wget or use your browser. To do so, first, visit the official download page of oracle java and choose between java 17 or 19.Īnd there, you will find the deb package available: Sadly, the Oracle JDK is not available in the default repository of Ubuntu so you will have to install the Debian package in Ubuntu manually. So if you are looking to install a specific version of JRE, you will have to execute the apt in the following manner: sudo apt install openjdk-jreįor example, if I want to install JDK version 17, then I will be using the following command: sudo apt install openjdk-17-jre Install Oracle JDK in Ubuntu So if you want to install a specific version of JDK, you will have to execute the apt in the following manner: sudo apt install openjdk-jdkįor your reference, here, I installed the JDK version 17: sudo apt install openjdk-17-jdk To install a specific version of JRE on Ubuntu To install the specific version of JDK on Ubuntu Here, I will walk you through how you can install a specific version of both JDK and JRE. To list available versions of java, use the following command: apt list OpenJDK\* The default repository allows you to choose from various versions of JDK and JRE so if your workflow demands a different version, here you have it. To install JRE, all you have to do is execute the following command: sudo apt install default-jre Install Specific Version of Java So if you are into software development, installing JRE can come in handy. OpenJDK 64-Bit Server VM (build 11.0.18 10-post-Ubuntu-0ubuntu122.04, mixed mode, sharing) To install Open JRE (optional): OpenJDK Runtime Environment (build 11.0.18 10-post-Ubuntu-0ubuntu122.04) Once you are done with the installation, you can check the installed version of java to verify the installation: java -version :~$ java -version So if you want the JDK package, all you have to do is execute the following command: sudo apt update
0 Comments
Leave a Reply. |