try using this command in the terminal:

sudo apt install default-jre

then you can try using:

java -version

to check version

Answer from neoMidori on askubuntu.com
🌐
Oracle
java.com › en › download › help › linux_x64_install.html
Linux 64-bit installation instructions for Java
This procedure installs the Java Runtime Environment (JRE) for 64-bit Linux, using an archive binary file (.tar.gz). Go to http://java.com and click on the Download button.
🌐
Oracle
oracle.com › java › technologies › downloads
Download the Latest Java LTS Free
Download the Java including the latest version 17 LTS on the Java SE Platform. These downloads can be used for any purpose, at no cost, under the Java SE binary code license.
Discussions

How do I install Java JRE on Linux?
Do you need to install Oracle's Java? Cuz if you don't need you can just open a terminal and type sudo apt install default-jre -y and it's ready to use (if you're on debian-based distros) More on reddit.com
🌐 r/linuxquestions
15
7
February 16, 2021
Attempting to download Java 17 on Linux Mint
Installing oracle jdk is a hassle in linux. Install openjdk instead by using sudo apt install openjdk-17-jdk More on reddit.com
🌐 r/linuxmint
10
9
December 31, 2021
How do i install Java on Xubuntu?
sudo apt install openjdk-8-jre More on reddit.com
🌐 r/linuxmasterrace
22
0
January 8, 2018
How do I install Java 8 JRE
I'd suggest you run sudo apt update; sudo apt list | grep jre to find the package name. I do remember that the JRE and JDK package names are often confusing, so that's why I'm recommending this approach. More on reddit.com
🌐 r/linux4noobs
8
2
May 30, 2023
🌐
Ubuntu
ubuntu.com › tutorials › install-jre
Install the Java Runtime Environment | Ubuntu
An Oracle account is needed to download the Oracle HotSpot JRE. Oracle does not currently offer JRE packages for Java 11 or above from their website so, for this tutorial, we will use the Oracle HotSpot JRE version to be 8u291 (Java 8, update 291). Create a directory to install JRE in with: sudo mkdir /usr/local/java · Move the JRE binaries into the directory: sudo mv jre-8u291-linux-x64.tar.gz /usr/local/java ·
Find elsewhere
🌐
Oracle
java.com › en › download › help › linux_install.html
How do I download and install 32-bit Java for Linux?
Instructions to download and install the Java Runtime Environment (JRE) for 32-bit Linux
🌐
Oracle
java.com › en › download › manual.jsp
Download Java
» What is Java » Remove older versions » Security » Support » Other help · This download is for end users who need Java for running applications on desktops or laptops. Java 8 integrates with your operating system to run separately installed Java applications.
🌐
OpenJDK
openjdk.org
OpenJDK
Learn about the key active Projects in the Community including Amber (high-productivity language features), Babylon (foreign programming models), Leyden (better startup and warmup), Loom (lightweight concurrency), Panama (foreign functions and foreign data), Valhalla (primitive types and ...
🌐
GeeksforGeeks
geeksforgeeks.org › linux-unix › download-install-java-windows-linux-macos
Installing Java on Windows, Linux, and macOS - GeeksforGeeks
April 20, 2026 - Download the .tar.gz file for Linux. This is the format used for installing Java on most Linux systems.
🌐
Red Hat
developers.redhat.com › products › openjdk › download
Download the Red Hat Build of OpenJDK | Red Hat Developer
July 25, 2024 - Download the Red Hat Build of OpenJDK at no-cost. The Red Hat build of OpenJDK is an open source implementation of the Java Platform, Standard Edition (Java SE)
🌐
Azul Systems
azul.com › home › azul downloads
Java 8, 11, 17, 21, 25 Download for Linux, Windows and macOS
May 7, 2026 - Click here to download the Azul Zulu Builds of OpenJDK for Java 8, 11, 17, 21, 25 for Linux, Windows and macOS. Also download Azul Platform Prime.
🌐
Oracle
java.com › en › download › help › linux_x64rpm_install.html
Linux 64-bit RPM Java installation instructions
This procedure installs the Java Runtime Environment (JRE) for 64-bit RPM-based Linux platforms, such as Red Hat and SuSE, using an RPM binary file (.rpm) in the system location. You must be root to perform this installation. Go to http://java.com and click on the Download button.
🌐
Oracle
java.com › en
Java | Oracle
Free Java Development Kit (JDK) downloads and resources from Oracle, the stewards of Java · Developer Downloads · Developer Resources · Enterprise Resources ·
🌐
FlyingMachineArena
flyingmachinearena.org › home › how to install java for linux
How to Install Java for Linux - FlyingMachineArena
March 4, 2026 - Distributions like Ubuntu, Debian, Fedora, CentOS, and Arch Linux all provide Java packages through their respective repositories. This method simplifies installation, updates, and uninstallation. Manual Installation from Oracle/OpenJDK Tarballs: For specific versions or to have finer control over the installation path, you can download the official JDK tarballs from Oracle or the OpenJDK project and install them manually.
🌐
GeeksforGeeks
geeksforgeeks.org › java › download-and-install-jdk-on-windows-mac-and-linux
Download and Install JDK on Windows, Mac and Linux - GeeksforGeeks
April 4, 2026 - Provides tools to develop, compile, ... JDK, JRE and JVM should not be confused with one another. ... Go to the Official JDK website to download the file....
🌐
Oracle
java.com › en › download › help › windows_manual_download.html
How do I manually download and install Java for my Windows computer?
Use these simple instructions to manually download and install Java (also known as Java Runtime Environment or JRE) for your Windows computer
🌐
Coderanch
coderanch.com › t › 735031 › java › Installing-Java-Linux
Installing Java on Linux? (Java in General forum at Coderanch)
The "apt-get update" command updates your machine's local list of distro servers to reflect the currenlly-available mirrors (presumably focused on the ones that respond fastest). That helps optimize the package download process. If you go that route, it's no different than installing any other Linux app. You can also pull pure binaries built by the OpenJDK project and hosted on Oracle's java.net servers.
🌐
Oracle
docs.oracle.com › en › java › javase › 22 › install › installation-jdk-linux-platforms.html
Installation of the JDK on Linux Platforms
March 14, 2024 - In addition, you can check which specific RPM package provides the java files: ... See Oracle JDK Certified Systems Configurations for information about supported platforms, operating systems, and browsers. You can install the JDK on a Linux platform from archive files, debian packages, downloadable Red Hat Package Manager (RPM) packages files, or RPM packages from Oracle Linux (OL) repositories.