Java on Ubuntu 15.10

Hi All,

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 $(lsb_release -sc) universe" sudo apt-get update sudo apt-get install openjdk-8-jre-headless
Note: If 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.

ciao, Dave

Hi Dave,

Good catch; but the Universe repository is enabled by default on a fresh install, isn’t it?
(We’ve made multiple fresh install tests, including Ubuntu 15.10, and except for versions < 14.10, there was nothing to add in order to be able to install openjdk-8-jre-headless)

By the way, we’ve posted early this week an update in the Getting Started for Linux, including a slightly different method.


Hi Daav,

No problems - I was confused and it took me a little while to figure out why the install was failing.

That was my understanding too - but apparently not on the livecd image I have here.

$ lsb_release -a Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily
and the contents of /etc/apt/sources.list

deb cdrom:[Ubuntu 15.10 _Wily Werewolf_ - Release amd64 (20151021)]/ wily main restricted deb wily main restricted deb wily-security main restricted deb wily-updates main restricted

Could be an older install image though…

ciao, Dave

Oh, you’re running it directly from the live CD (“Try Ubuntu” mode), not on an installed version?
I experienced that as well.
So your point stays valid :wink:

Hi guys, I’d tried to do so following these instructions you’ve provided here, but in my very case this solution appears to be not working. Maybe the point is I’ve changed the Ubuntu local server not so long ago, and now I don’t know what to do with this - majority of my default software is refusing to update with error stand for “Failed to parse repository” or soething, and so on. Actually, I’m quite new to java (new-new, just 2 months have passed, to be frank) and had some problems with installing JDK from Windows as well, right before a friend of mine, who is sort of my mentor with that, suggested to browse this website with materials on how to learn java and there I found some instructions for several cases when manual installation goes wrong. Nevertheless, it doesn’t work in this case with Ubuntu, and many other applications as well. I’d never used UNIX-systems before, have I done something wrong?