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.

Answer from Andrew on askubuntu.com
🌐
OpenJDK
openjdk.org › install
OpenJDK: Download and install
$ sudo apt-get install openjdk-8-jre · 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. On the command line, type: $ su -c "yum install java-1.8.0-openjdk" The java-1.8.0-openjdk package ...
🌐
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 - sudo apt install software-properties-common sudo add-apt-repository universe sudo apt update sudo apt install openjdk-8-jdk · If java is still missing after installation, check whether the OpenJDK 8 packages are installed and whether alternatives ...
Discussions

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... More on stackoverflow.com
🌐 stackoverflow.com
How can I install Java 8 on Debian 12 (bookworm)? - Unix & Linux Stack Exchange
wget http://www.mirbsd.org/~tg/Debs/sources.txt/wtf-bookworm.sources sudo mkdir -p /etc/apt/sources.list.d sudo mv wtf-bookworm.sources /etc/apt/sources.list.d/ sudo apt update · You’ll then see openjdk-8-jdk, openjdk-8-jre, etc. More on unix.stackexchange.com
🌐 unix.stackexchange.com
June 26, 2023
java - How to install openjdk-8-jdk on Debian 10 (Buster)? - Stack Overflow
If you install openjdk-8 in python:3.7-buster Docker image you have to add command mkdir -p /usr/share/man/man1/ 2020-05-15T11:35:20.607Z+00:00 ... After following the posts instructions, the JAVA_HOME var is /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/jre/, for anyone looking... 2020-05-19T18:16:54.05Z+00:00 ... for those who gets error on second command "add-apt-repository: command not found" try this extra step after first sudo ... More on stackoverflow.com
🌐 stackoverflow.com
java - Install JDK 8 on Debian - Unix & Linux Stack Exchange
I am trying to install JDK 8 on Debian. I found a lot of similar topics but none of them solved my problem. In most topics the solution was this commands sudo apt-get install software-properties-c... More on unix.stackexchange.com
🌐 unix.stackexchange.com
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
🌐
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...
🌐
Imec
jfed.ilabt.imec.be › java8_on_linux
Java 8 on Linux
sudo apt-get update sudo apt-get install openjdk-8-jre openjfx
🌐
DZone
dzone.com › coding › java › installing open jdk 8 on ubuntu
Installing Open JDK 8 on Ubuntu
November 13, 2020 - OpenJDK 64-Bit Server VM (build ... OpenJDK and latest JDK will be installed: Shell · xxxxxxxxxx · 1 · 1 · sudo apt-get install openjdk-8-jdk ·...
Find elsewhere
🌐
GeoFIS
geofis.org › accueil › install › install on linux › install openjdk 8 on ubuntu trusty
Install OpenJDK 8 on Ubuntu Trusty - GeoFIS
September 20, 2018 - Add this repository to your system’s Software Sources: sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update Install OpenJDK 8: sudo apt-get install openjdk-8-jdk Check which JDK-Versions are available on your system perform: sudo update-java-alternatives --list you get something ...
🌐
Linux Mint Forums
forums.linuxmint.com › board index › debian edition support › lmde forums › lmde archive
Installing OpenJDK8 - Linux Mint Forums
Done Building dependency tree Reading state information... Done ca-certificates-java is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. person@computer ~ $ sudo apt-get install openjdk-8-jre-headless Reading package lists...
Top answer
1 of 12
158

Alternatively, you can use adoptopenjdk repository:

wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -

sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/

sudo apt-get update && sudo apt-get install adoptopenjdk-8-hotspot

https://adoptopenjdk.net/installation.html

2 of 12
80

WARNING: this answer suggest unsupported and dangerous mixing of Debian releases. Follow the advice on your own risk, as it can break the system on upgrades, as explained in http://wiki.debian.org/DontBreakDebian#Don.27t_make_a_FrankenDebian

Package mirror search steps:

  1. In the Search package directories search for openjdk-8-jdk. You can see two results:

    • stretch (oldstable) (java): OpenJDK Development Kit (JDK)
    • sid (unstable) (java): OpenJDK Development Kit (JDK)
  2. Choose stretch repository

  3. Scroll to the Download openjdk-8-jdk section and choose your architecture. For example amd64

  4. Now you can see mirrors list and instructions how to install the package via apt:

    You should be able to use any of the listed mirrors by adding a line to your /etc/apt/sources.list like this:

    deb http://security.debian.org/debian-security stretch/updates main

Installation steps:

  1. Install software source manager

    apt-get update
    apt-get install software-properties-common
    
  2. Add mirror with openjdk-8-jdk

    apt-add-repository 'deb http://security.debian.org/debian-security stretch/updates main'
    apt-get update
    
  3. Install openjdk 8

    apt-get install openjdk-8-jdk
    

Note: You can use steps above to find an official Debian mirror with any other package you want to install

Top answer
1 of 3
1

openjdk-8 is available in my default Jessie/stable install - just need to apt-get install it (openjdk-8-jdk and whatever else you want/need that it recommends or depends on)

Of course, it MAY depend on your /etc/apt/sources.list file including the contrib and non-free repositories

/etc/apt/sources.list should look something like

deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-backports main contrib non-free
2 of 3
0

The first thing is always see the Debian PTS to have an idea of what options are available to you. For instance, if I go to -

https://tracker.debian.org/pkg/openjdk-8

On the left-hand side you have something called versions - can you see it, it shows -

  stable-bpo: 8u121-b13-1~bpo8+1
     testing: 8u121-b13-3
    unstable: 8u121-b13-4

Now stable-bpo means it is in backports. the backports page describes its function excellently, see https://backports.debian.org/

So you need to add as shared by @Reto as well the backports address to the list of packages that you already have -

deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-backports main contrib non-free

Now update the index, it should say something like this at the very end -

Reading package lists... Done
Building dependency tree       
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.

Don't see the number of packages that can be upgraded as that's a function of how many packages I have, how often I update packages etc. If the four lines are similar to above, that means the index updation went without a hitch, no errors.

Once that is done you could simply do -

$ aptitude search openjdk-8

to get a listing of how many different openjdk-8 packages are listed or not. For instance I'm on testing and there are quite a few here. We also have openjdk-9 as well.

Once you get it , just install as you were trying to install before -

$ sudo aptitude install openjdk-8 

and let aptitude handle all the dependancy resolution. If you still have issues, let us know here.

🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › using the raspberry pi › beginners
Cant install java with sudo apt-get install - Raspberry Pi Forums
Some Minecraft mods require Java ... from an old version of Oracle Java 8 to the latest OpenJDK 8 JRE, and everything is running well). If java -version does not return any working Java on your system, then sudo apt install openjdk-8-jre should get you up and runn...
🌐
Reddit
reddit.com › r/linuxquestions › trouble installing openjdk 8
r/linuxquestions on Reddit: Trouble installing OpenJDK 8
July 16, 2019 -

I'm running Debian 9.9 Stretch and am having problems installing OpenJDK 8. I've been Googling stuff for a while but I'm getting nowhere.

Upon entering:

sudo apt-get install openjdk-8-jdk-headless    

The output is:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package openjdk-8-jdk-headless is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'openjdk-8-jdk-headless' has no installation candidate

I'd appreciate any help or tips on where to look to resolve this.

edit - Problem solved. Finding older versions of OpenJDK on repositories is hard work, if you want one, just download and install it yourself. As for the reason I posted this, the Minecraft server works fine with OpenJDK 11.

🌐
TecAdmin
tecadmin.net › install-oracle-java-8-ubuntu-via-ppa
How To Install Java 8 on Ubuntu 18.04/16.04, LinuxMint 19/18
April 26, 2025 - This article is out of date, and, as of September 2019, no longer works. ... sudo apt-get install default-jdk sudo apt autoremove sudo apt-get install default-jre java –version sudo apt install openjdk-8-jdk
🌐
Server World
server-world.info › en › note
Ubuntu 22.04 : OpenJDK 8 : Install : Server World
August 29, 2022 - This article provides an example of how to install OpenJDK 8 from a package and check its operation on Ubuntu 22.04 LTS.
🌐
Google Support
support.google.com › chromebook › thread › 82961979 › how-do-i-install-openjdk-8-jdk
How do I install openjdk-8-jdk - Chromebook Community
Skip to main content · Chromebook Help · Sign in · Google Help · Help Center · Community · Chromebook · Terms of Service · Submit feedback · Send feedback on