How to install Java 25 on AlmaLinux 10

In this blog post, we will install the latest stable version of Java and which is Java 25, on AlmaLinux 10 OS. Java is an object-oriented programming language that comes in three different editions. The main editions are Java SE (Standard Edition) for general-purpose applications, Java EE (Enterprise Edition) for large-scale enterprise applications, and Java ME (Micro Edition) for mobile and embedded devices. Java has also different packages to choose from: Java Runtime Environment (JRE) and Java Development Kit (JDK). The JDK includes JRE, and there are two different implementations of JDK, OpenJDK and Oracle Java. In this tutorial, we will cover these two.

Installing Java 25 on AlmaLinux 10 is a straightforward process that may take up to 10 minutes, depending on whether we are installing from the default AlmaLinux 10 repository or building from a source file. Let’s learn both ways!

Prerequisites

Update your system

Before installing anything on the server, it is a good practice to update the system packages to their latest versions available. To do that, execute the following command in your terminal of AlmaLinux 10:

sudo dnf update -y && sudo dnf upgrade -y

Install OpenJDK Java 25 from AlmaLinux 10 Repository

Java 25 is already included in the default repository of AlmaLinux 10, and to install it, simply execute the following command:

sudo dnf install java-latest-openjdk.x86_64 -y

To verify the installation, execute the command below:

java --version

You should get output similar to this:

[root@test ~]# java --version
openjdk 25 2025-09-16
OpenJDK Runtime Environment (Red_Hat-25.0.0.0.36-2) (build 25+36)
OpenJDK 64-Bit Server VM (Red_Hat-25.0.0.0.36-2) (build 25+36, mixed mode, sharing)

Install Oracle Java 25

Installing Oracle Java 25 is from a source file, downloaded directly from the Oracle website. To download the installation package, execute the following command:

sudo wget https://download.oracle.com/java/25/latest/jdk-25_linux-x64_bin.rpm

To install the package execute the command bellow:

sudo rpm -ivh jdk-25_linux-x64_bin.rpm

The installation process should look like this:

[root@test ~]# rpm -ivh jdk-25_linux-x64_bin.rpm
warning: jdk-25_linux-x64_bin.rpm: Header V3 RSA/SHA256 Signature, key ID 8d8b756f: NOKEY
Verifying… ################################# [100%]
Preparing… ################################# [100%]
Updating / installing…
1:jdk-25-2000:25.0.1-8 ################################# [100%]

To verify the installation, execute the command below:

java --version

You should get output similar to this:

[root@test ~]# java --version
java 25.0.1 2025-10-21 LTS
Java(TM) SE Runtime Environment (build 25.0.1+8-LTS-27)
Java HotSpot(TM) 64-Bit Server VM (build 25.0.1+8-LTS-27, mixed mode, sharing)

As you can notice, the output is different than the previous output for the OpenJDK heading. To check this, you can execute the following command to be sure that the latest installed version of Oracle Java is the active one:

alternatives --config java

You should get the following output:

[root@test ~]# alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           /usr/lib/jvm/java-latest-openjdk/bin/java
*+ 2           /usr/lib/jvm/jdk-25.0.1-oracle-x64/bin/java

Enter to keep the current selection[+], or type selection number:

As you can see that there are two versions of Java 25, and the active one is the Oracle Java 25 because that is the latest installed edition. To change the active Java to OpenJDK java type 1 and hit Enter.

Execute again the command alternatives –config java and you will see the active edition:

[root@test ~]# alternatives --config java

There are 2 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
 + 1           /usr/lib/jvm/java-latest-openjdk/bin/java
*  2           /usr/lib/jvm/jdk-25.0.1-oracle-x64/bin/java

Enter to keep the current selection[+], or type selection number: 

Difference between OpenJDK and Oracle Java

OpenJDK is the open-source reference implementation of the Java SE platform, licensed under the GNU GPL with the Classpath Exception, and freely usable, modifiable, and distributed by anyone.

Oracle Java (also known as Oracle JDK) is Oracle’s commercially-licensed build derived from the same core code base, but it carries proprietary licensing, usage restrictions for production, and paid support options. Functionally, they are nearly indistinguishable for most development and runtime tasks—since Oracle’s builds are based on the OpenJDK source—but the key differences lie in licensing terms, support models, release cadence and commercial-grade tooling.

That’s it. You successfully installed Java 25 on AlmaLinux 10 and learned how to switch the different editions with one simple command.

If you liked this post about installing Java 25 on AlmaLinux 10, please share it with your friends or leave a comment down below.

Leave a Comment