# JAVA 21.x on Ubuntu 22.04+

This article provides the steps to install Java 21 on an Ubuntu machine. The procedure includes updating system packages, installing the required Java Development Kit (JDK), and verifying the installation. This setup is required for applications and connectors that depend on Java runtime support within the OvalEdge platform.

## Prerequisites

Ensure the following requirements are met before proceeding:\\

* **Operating System**: Ubuntu 22.04 or later
* **Privileges**: A user account with `sudo` privileges or root access to the machine
* **Network**: An active internet connection for accessing official package repositories

## Installation Steps

1. Update System Packages
   1. Update the package repository and upgrade existing packages to the latest versions.

      ```bash
      sudo apt update
      sudo apt upgrade -y
      ```
2. Install Java 21
   1. Install OpenJDK 21 from the default Ubuntu repositories.

      ```bash
      sudo apt install openjdk-21-jdk -y
      ```
3. Verify Installation
   1. Verify that Java is installed successfully by checking the version.

      ```bash
      java -version
      ```
   2. Expected Output:

      ```bash
      openjdk version "21.x.x"
      ```

      <figure><img src="/files/kUE7kU9WHZKAUzpxppzS" alt=""><figcaption></figcaption></figure>

***

Copyright © 2026, OvalEdge LLC, Peachtree Corners, GA, USA.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ovaledge.com/release8.1/deployment-and-maintenance/installation/java-21.x-on-ubuntu-22.04+.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
