java, centos,

Install Java on CentOS 9 Stream

May 13, 2022 · 1 min read · Post a comment

As a Java developer on the new CentOS 9 Stream OS, you may wonder how to set up your java environment. The installation of Java on CentOS 9 Stream can be achieved in a few steps. Let’s take a look.

Prerequisites

  • CentOS 9 Stream
  • sudo privileges

Install Java on CentOS 9 Stream

Step 1. As usual, update the system packages.

sudo dnf update

Step 2. To install the current latest Java version, run:

sudo dnf install java-17-openjdk-devel

Step 3. If you want some specific version, for example Java 11, run:

sudo dnf install java-11-openjdk-devel

Step 4. Verify installation.

java --version

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.