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 & sudo apt install default-jdk Oracle JDK mainly focuses on stability, best suited for enterprise purposes. One thing to remember is that JDK has an Oracle version used for commercial purposes.Īlthough there are no significant differences between Oracle JDK and OpenJDK, Oracle JDK offers higher performance and responsiveness. Whereas the JRE has some additional tools to facilitate the development process. The JDK packages contain every essential package that the user needs to run a java application. There are two ways to install Java in Ubuntu: Java is one of the most robust programming languages for developing websites, games, Android, and desktop apps.Īnd to check whether java is already installed on your system, you can use the following: java -versionĪnd if it comes up with any version number, you have it already installed, and if it shows an error saying Command 'java' not found, here you have various ways to java on Ubuntu.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |