OpenJDK Runtime Environment (build 1.8.0_312-b07) Sample output: openjdk version "1.8.0_312" Next, verify your current Java version using the following command: java -version Select your preferred option and hit Enter to set the default Java version. You will be asked to set the default Java versions as shown below: There are 3 programs which provide 'java'.ġ java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-1.el8_4.x86_64/bin/java)Ģ java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.8_4.x86_64/jre/bin/java)Įnter to keep the current selection, or type selection number: 2 If you are using multiple Java versions in your project, then you can easily switch between them using the following command: alternatives -config java ![]() Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing) Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39) ![]() Next, verify the Java version using the following command: java -version You will get the following output: warning: jdk-17_linux-圆4_bin.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY Once the download is completed, you can install it using the following command: rpm -ivh jdk-17_linux-圆4_bin.rpm First, you will need to download it from its official website: wget You can also install the OpenJDK 8 using the following command: dnf install java-1.8.0-openjdk-devel Install Oracle JDK 17Īt the time of writing this article, the latest version of Oracle JDK is 17. You can install it using the following command: dnf install java-11-openjdk-devel -y Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing)īy default, OpenJDK 11 is available in the Rocky Linux default repository. Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29) You will get the following output: java 21.0.1 LTS You can also verify the Java version using the following command: java -version ![]() Next, verify the Java path using the following command: echo $JAVA_HOME Save and close the file, then activate the Java path using the following command: source /etc/profile.d/java.sh You can do it by creating the file java.sh: nano /etc/profile.d/java.shĪdd the following lines: export JAVA_HOME=/opt/jdk-21.0.1 Next, you will need to add the Java source path to the system environment. Next, move the extracted directory to the /opt directory: mv jdk-21.0.1 /opt/ ![]() Once the download is completed, install the tar package and extract the downloaded file with the following command: dnf install tar -y By default, the latest version is not available in the Rocky Linux 8 default repository, so you will need to install it from the source.įirst, download the latest version of OpenJDK from the Java official website: wget Install OpenJDK 21Īt the time of writing this article, the latest version of Java OpenJDK is version 21. I just want to figure out what is the root case for “java >= 1:1.8.0 is needed by openfire-4.4.1-1.noarch” when installing Openfire or if I just misunderstanding about Openfire between the diff versions and then did the incorrect operations for my purpose.In this section, we will show you how to install OpenJDK version 21, 11, and 8 on Rocky Linux 8. Sorry for not very family with Linux and the exact OS version is: centos-release-7-6.1810.2.86_64.īeacuse Oracle JDK is not free anymore since Jan 2019, so the company decided to replace the Java from Oracle JDK to OpenJDK, Openfire(now running 64bit JRE bundled) is included.įor this, we need to uninstall the JRE bundled version and install no JRE bundled one, right? Before that, we have to install OpenJDK first and when those steps are done, we’ll check if the Openfire no JRE bundled with openJDK is still working.īTW, I have tried openJDK 11 with Openfire 4.4.1.noarch before, still got the same error message I mentioned it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |