MQ-Jr
MQ-Jr
unixcop Admin

How To Install Adoptium Temurin on AlmaLinux 9

In this guide, we will show you how to download, install and use Adoptium Temurin on your AlmaLinux systems.

Java™ is the world’s leading programming language and platform. The Adoptium Working Group promotes and supports high-quality, TCK certified runtimes and associated technology for use across the Java ecosystem. Eclipse Temurin is the name of the OpenJDK distribution from Adoptium.

With Adoptium Temurin , You can prebuilt OpenJDK binaries for Free!

Install Adoptium Temurin on AlmaLinux:

Follow the steps below to get started with Adoptium Temurin:

  • Update your AlmaLinux system packages with running the below command:
sudo dnf clean all && sudo dnf update
sudo dnf groupinstall "Development Tools"
  • Adoptium Temurin package is not available on AlmaLinux base repository. So You can run the following command to download Adoptium Temurin on your AlmaLinux system as follows:
wget https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.2%2B8/OpenJDK17U-jdk_x64_linux_hotspot_17.0.2_8.tar.gz
  • Extract the downloaded tar then move jdk to /opt directory as follows:
tar -xvf OpenJDK17U-jdk_x64_linux_hotspot_17.0.2_8.tar.gz
sudo mv jdk-17.0.2+8/ /opt/jdk-17

  • Export the Environment variables with the below commands:
export JAVA_HOME=/opt/jdk-17
export PATH=$PATH:$JAVA_HOME/bin
  • Verify the set path by running:
echo $JAVA_HOME
  • Check the version of JAVA as follows:
java --version

Test Temurin OpenJDK

  • Create a sample file for testing Temurin OpenJDK as below:
sudo vim  unixcop.java 

Then add the following:

public class hellounixcop {
  public static void main(String[] args) {
    System.out.println("Hello Unixcop Visitors");
  }
}
  • Save and close the file, then compile it using Java as follows:
java unixcop.java

Install Adoptium Temurin -Conclusion

That’s it

Thanks.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook