Get a VPS server with a 15% discount
Sale ends in
00Days
:
00Hours
:
00Minutes
:
00Seconds

How to Install JDK 25 (Java 25) on Debian 13

In this guide, we will explain how to install JDK 25 (Java 25) on a server running Debian 13.

Installing Java on Debian

Debian 13 includes JDK 25 in its repositories by default, so no separate configuration like in Ubuntu is required. Here everything is a bit simpler.

Step 1. Update the package lists

To do this, use the command below

In our Debian images, the sudo package is not installed by default. Run the listed commands without sudo - as the root user. If needed, sudo can be installed with the command

Updating the package lists with the apt update command on Debian 13

Step 2. Installing JDK 25

Next, we will install the JDK 25 package using the command below

The process takes a couple of minutes on average. This depends on the network speed and server performance.

Installing the openjdk-25-jdk package on Debian 13

Step 4. Verifying the installation

After the installation is complete, we will check the Java version.

The output should match the screenshot below. This way you can make sure that Java is installed and fully ready to use

Output of the java -version command with JDK 25 installed

Removing Java

If you have decided to remove this Java, use the commands below

The command below also removes the Java package configuration