1

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?

1

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.

  • You can also install openjdk-8 from the jessie-backports archive. – GiantTree Jun 15 at 9:41
  • 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 Jun 15 at 10:09
  • @GiantTree How I can do this? – TheUnreal Jun 15 at 10:10
  • 1
    @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). – GiantTree Jun 15 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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