Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install openjdk-8-jdk on Debian 10 (Buster)?

It seems Debian does not support openjdk-8-jdk anymore due to a security issue. What is the easiest way to install openjdk-8-jdk for Debian 10 (Buster)?

like image 826
Graham Lee Avatar asked Jul 14 '19 22:07

Graham Lee


People also ask

Is OpenJDK 8 still supported?

OpenJDK 8 is now retired on RHEL 6 since its end of life so 1.8. 0_275 was the last and final OpenJDK 8 update made available for RHEL 6. RHEL 7 or 8 must be used for continued OpenJDK support and its latest updates moving forward.


2 Answers

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

like image 131
Nizarazu Avatar answered Sep 22 '22 18:09

Nizarazu


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

like image 25
Hirurg103 Avatar answered Sep 21 '22 18:09

Hirurg103