Just a quick note if you’re having trouble installing the openjdk-8-jre-headless package on Ubuntu.
I found that I kept getting an “Unable to locate package openjdk-8-jre-headless” error when using apt-get install.
Turns out that the openjdk-8 package is in the Universe repository - which wasn’t enabled by default in the package manager sources list.
To resolve this issue, do the following from a terminal window:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update
sudo apt-get install openjdk-8-jre-headless
lsb_release -sc fails, you need to install the package lsb-release
sudo apt-get install lsb-release and then re-run the sudo add-apt-repository commands.