Unable to locate package oracle-java8-installer

10,364

You have two alternatives:

  1. Manually download the .tar.gz file for Oracle Java SE Development Kit 8 from the official Oracle website, and compile it by following the instructions in How do I install a .tar.gz (or .tar.bz2) file?.

  2. Install Java 7 from the default Debian jessie repositories.

    sudo apt-get install openjdk-7-jdk
    

The default Java JDK package is openjdk-8-jdk in Debian stretch and openjdk-11-jdk in buster.

Oracle is no longer maintaining OpenJDK 8 and OpenJDK 11. Red Hat is providing bug fixes and security patches for OpenJDK 8 and OpenJDK 11, taking over from Oracle. If you are using OpenJDK from the default Debian repositories, Oracle's license cancellation doesn't matter at all because Debian will continue to support their Java packages the same way they support every other package in their repositories.

Share:
10,364

Related videos on Youtube

TheUnreal
Author by

TheUnreal

Full Stack Web Developer, Entrepreneur

Updated on September 18, 2022

Comments

  • TheUnreal
    TheUnreal over 1 year

    I'm simply trying to install the oracle-java8-installer package in order to install JAVA 8 on my debian server.

    No idea why, I get the following output:

    root@vps:~# sudo apt-get install oracle-java8-installer
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package oracle-java8-installer
    

    Any idea what could have gone wrong?

  • GiantTree
    GiantTree almost 5 years
    You can also install openjdk-8 from the jessie-backports archive.
  • TheUnreal
    TheUnreal almost 5 years
    Thanks. my goal is to install Java 8. if I run sudo apt-get install openjdk-7-jdk java 7 is installed, I could not find a way to install java 8. any idea?
  • TheUnreal
    TheUnreal almost 5 years
    @GiantTree How I can do this?
  • GiantTree
    GiantTree almost 5 years
    @TheUnreal it is more complicated now than it was some time ago. The easiest solution would be to install a modern Debian version (Stretch/9 now and Buster/10 in a few weeks). On Debian 8 activate the jessie-backports like here: unix.stackexchange.com/a/508840 and then install openjdk-8-jdk from there (using apt install -t jessie-backports openjdk-8-jdk).