title: Downgrade open jdk 8 to 7 in ubuntu 14.04
body: <p>I accidentally upgraded the whole system in ubuntu 14.04.</p>
  
  <p>I am trying to deploy a war file which requires JDK7.</p>
  
  <p>I tried to install JDK7 and use it as default </p>
  
  <pre><code>root:floyd~# update-alternatives --config java
  There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
  Nothing to configure.
  </code></pre>
  
  <p>but it is not installing as well. It gives following error while trying to install JDK 7.</p>
  
  <pre><code>root@floyd:~# apt-get install openjdk-7-jdk
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  Package openjdk-7-jdk 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
  
  N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
  E: Package 'openjdk-7-jdk' has no installation candidate
  </code></pre>
  
  <p>I guess I have two options. </p>
  
  <ol>
  <li>Install JDK7 and use it as default.</li>
  <li>Downgrade JDK8 to JDK7.</li>
  </ol>
  
  <p>I think downgrading can be a good option but I am not able to do any of them.</p>