3

This question already has an answer here:

I have just Updated to the new Ubuntu 16.04. This is a fresh installation of this OS. Trying to install Openjdk 7 but I got this error.

Package 'openjdk-7-jre' has no installation candidate

how do I fix it?

marked as duplicate by Ketan Patel, Eric Carvalho, user364819, Thomas Ward Jun 13 '17 at 17:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Install 8 or 9 which has instalation canidates – Videonauth Apr 27 '16 at 1:08
4

if you really want to install JDK7, add these in your /etc/apt/sources.list file,

deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

by issuing a following command,

sudoedit /etc/apt/sources.list

then run,

sudo apt-get update

run apt-cache search openjdk-7-jre to verify.

0
  1. Go to the download page
  2. Download the rpm
  3. alien it

alien jdk-7u80-linux-x64.rpm

  1. install it

dpkg -i jdk_1.7.080-1_amd64.deb

Not the answer you're looking for? Browse other questions tagged or ask your own question.