Usually you install the openjdk like this:

sudo apt-get install openjdk-8-jdk

Maybe this is the problem. You can look this up at http://openjdk.java.net/install/index.html. If you do this you might have fixed this problem. But cant imagine why your command give this result.

Answer from Booming on askubuntu.com
🌐
LinuxCapable
linuxcapable.com › home › ubuntu › how to install openjdk 8 on ubuntu 26.04, 24.04 and 22.04
How to Install OpenJDK 8 on Ubuntu 26.04, 24.04 and 22.04 - LinuxCapable
April 29, 2026 - If that is your constraint, you can install OpenJDK 8 on Ubuntu from the Ubuntu archive instead of downloading a separate vendor tarball or adding a PPA. OpenJDK 8 packages are available from the universe component on Ubuntu 26.04 (resolute), ...
Discussions

how do i get java 8 on bookworm Ubuntu i have been trying for 3 hours
you mean this? openjdk-8-jdk/noble-updates,noble-security 8u442-b06~us1-0ubuntu1~24.04 amd64 OpenJDK Development Kit (JDK) sudo apt install openjdk-8-jdk Found with.. apt search ^openjdk-8 More on reddit.com
🌐 r/linux4noobs
4
0
March 26, 2025
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
[deleted by user]
SDKMAN! should work. More on reddit.com
🌐 r/debian
12
4
April 7, 2024
need help installing java 8 on ubuntu server
Try running "sudo apt-get install default-jre" (without the quotes of course). This should install some version of the Java 8 runtime. Though I should tell you that if you are hosting a Minecraft 1.18/1.17 server, you will need Java 17 or above installed. If you're doing a version below 1.17, try the command I said above. More on reddit.com
🌐 r/Ubuntu
4
3
April 3, 2022
🌐
Stack Overflow
stackoverflow.com › questions › 71017113 › how-to-install-jdk-8-on-ubuntu-server-18-04
java - How to install jdk 8 on ubuntu server 18.04? - Stack Overflow
I am trying to install JDK 8 ON Ubuntu server 18.04 LTS, with the following commands: sudo apt install openjdk-8-jre sudo apt install openjdk-8-jdk /usr/lib/jvm folder has: I also set the path in...
🌐
GitHub
gist.github.com › starlinq › 9ee5209ceb32b7e05817e714fe530be3
How to install Java JDK8 in Ubuntu 16.04 · GitHub
The complete folder “jdk1.8.0_version” will be moved to /usr/lib/jvm. Delete the .tar.gz file if you want to save disk space. ... sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_181/bin/java" 1 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_181/bin/javac" 1 sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0_181/bin/javaws" 1
🌐
OpenJDK
openjdk.org › install
OpenJDK: Download and install
Oracle's OpenJDK JDK binaries for Windows, macOS, and Linux are available on release-specific pages of jdk.java.net as .tar.gz or .zip archives. As an example, the archives for JDK 13 may be found on jdk.java.net/13 and may be extracted on the command line using ... The openjdk-8-jre package contains just the Java Runtime Environment. If you want to develop Java programs then please install the openjdk-8-jdk package.
🌐
ComputingForGeeks
computingforgeeks.com › home › install java 8 (openjdk 8) on ubuntu 24.04 / 22.04
Install Java 8 (OpenJDK 8) on Ubuntu 24.04/22.04 [Guide]
March 25, 2026 - Install OpenJDK 8 on Ubuntu 24.04 or 22.04. Covers JDK and JRE, JAVA_HOME setup, switching between Java versions with update-alternatives.
🌐
TecAdmin
tecadmin.net › install-oracle-java-8-ubuntu-via-ppa
How to Install Java 8 on Ubuntu and Linux Mint
April 26, 2025 - Execute the following command in your terminal: ... Install OpenJDK 8 by running the following command. This command installs both the JDK and JRE, setting up your system for Java development and execution.
Find elsewhere
🌐
javathinking
javathinking.com › blog › jdk-8-install-ubuntu
Installing JDK 8 on Ubuntu: A Comprehensive Guide — javathinking.com
OpenJDK is an open-source, free-to-use alternative to Oracle JDK, ideal for most development and production scenarios. It avoids commercial license restrictions. First, refresh your system’s package index to ensure you get the latest available versions: ... For runtime-only use (no compiler), install openjdk-8-jre instead. Ubuntu 24.04 default repository provides OpenJDK 8, which can be directly installed using apt:
🌐
DataFlair
data-flair.training › blogs › install-java-8-on-ubuntu
Install Java 8 on Ubuntu - Step by Step Guide for Beginners - DataFlair
February 17, 2021 - update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_05/bin/java 100 update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_05/bin/javac 100
🌐
javathinking
javathinking.com › blog › jdk-8-install-linux
Installing JDK 8 on Linux: A Comprehensive Guide — javathinking.com
This blog provides a step-by-step guide to installing JDK 8 on Linux, covering multiple methods (package managers, manual installation), verification, environment setup, and best practices. Whether you’re using Debian/Ubuntu, RHEL/CentOS, or another Linux distribution, this guide will help ...
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-java-with-apt-on-ubuntu-18-04
How To Install Java with Apt on Ubuntu 18.04 | DigitalOcean
October 12, 2021 - By default, Ubuntu 18.04 includes ... but can be installed with: sudo apt install default-jre sudo apt install openjdk-11-jre-headless sudo apt install openjdk-8-jre-headless...
Top answer
1 of 5
19

As of now, 30 April 2019 02:00 UTC, Open JDK 8 and its associated packages have been added back to the normal Ubuntu 19.04 Disco Dingo repositories.

So you can now do the usual

sudo apt install openjdk-8-jdk

without adding any PPAs or downloading .deb packages.


As an aside, I believe the package was removed from 19.04 (while originally being there) because it was (erroneously?) removed from Debian testing (related bug report) and then cleaned up downstream. It has been re-added today by its maintainer Matthias Klose aka doko.

2 of 5
12

While PPA is the preferred method to install JDK 8 in order to get timely updates and fixes, but if you still want to install without PPA, you can download and install JDK 8 from Ubuntu's pool of Universe packages.

  • Download JDK and JRE:

    wget http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk-headless_8u191-b12-2ubuntu0.18.10.1_amd64.deb
    wget http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jdk_8u191-b12-2ubuntu0.18.10.1_amd64.deb
    wget http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre_8u191-b12-2ubuntu0.18.10.1_amd64.deb
    wget http://security.ubuntu.com/ubuntu/pool/universe/o/openjdk-8/openjdk-8-jre-headless_8u191-b12-2ubuntu0.18.10.1_amd64.deb
    
  • Install using dpkg:

    sudo dpkg -i openjdk-8-jre-headless_8u191-b12-2ubuntu0.18.10.1_amd64.deb \
    openjdk-8-jre_8u191-b12-2ubuntu0.18.10.1_amd64.deb \
    openjdk-8-jdk_8u191-b12-2ubuntu0.18.10.1_amd64.deb \
    openjdk-8-jdk-headless_8u191-b12-2ubuntu0.18.10.1_amd64.deb
    
  • Install dependencies:

    sudo apt install -f
    

If you want to install using PPA, add openjdk-r ppa and install:

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt update
sudo apt install openjdk-8-jdk openjdk-8-jre
🌐
Oracle
docs.oracle.com › javase › 8 › docs › technotes › guides › install › linux_jdk.html
6 JDK Installation for Linux Platforms
April 21, 2026 - You can install the JDK for Linux from an archive file (.tar.gz). The .tar.gz archive file (also called a tarball) is a file that can be uncompressed and extracted in a single step. ... For Linux aarch64 (64-bit ARM) systems: jdk-8uversion-linux-aarch64.tar.gz.
🌐
DZone
dzone.com › coding › java › installing open jdk 8 on ubuntu
Installing Open JDK 8 on Ubuntu
November 13, 2020 - DevOps engineers usually want to install and configure Open JDK 8 on Ubuntu systems. These instructions show how to install Open JDK on Ubuntu.
🌐
Liquid Web
liquidweb.com › home › how to install oracle java 8 on ubuntu 22.04
How To Install Oracle Java 8 on Ubuntu 22.04 | Liquid Web
December 2, 2024 - Next, go to http://java.com and click on the Download button. Now, download the tar.gz file of your choosing and then verify the size of the file to ensure that you have downloaded the full, uncorrupted software bundle.
🌐
Javadev
javadev.org › devtools › jdk › setup › linux
JDK installation in linux (Ubuntu, Centos)
#### JDK 1.8 ####################### export JAVA_HOME=/opt/jdk export PATH=${JAVA_HOME}/bin:$PATH #### JDK 1.8 ####################### $ sudo chmod 755 /etc/profile.d/java8.sh $ source /etc/profile.d/java8.sh ... $ sudo apt-get update $ sudo apt-get install -yq openjdk-8-jdk // get possible ...
🌐
Mkyong
mkyong.com › home › java › how to install java jdk on ubuntu
How to install Java JDK on Ubuntu - Mkyong.com
March 29, 2021 - This example shows how to use apt install to install the OpenJDK 8 and 11 on Ubuntu. 1.1 We can use sudo apt search openjdk to find all available OpenJDK in the default repository.
🌐
GitHub
gist.github.com › wagyourtail › b115f66d135b3818b63d9b27048d80e6
Installing Java 8 on various Linux distros · GitHub
Download the jre tar.gz (Linux Compressed Archive) from Oracle's Website or the Java Website. make sure to select the correct x86 / x64 for your Architecture, it's probably x64 if your computer's newer than 2005.