I'm trying to dowload and install the JDK 8 on my debian with the following command: apt-get install oracle-java8-installer

This is the log I get:

Do you want to continue? [Y/n] Y
Setting up oracle-java8-installer (8u191-1~webupd8~1) ...
Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc
Downloading Oracle Java 8...
--2019-01-15 23:15:16--  http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)...
Connecting to download.oracle.com (download.oracle.com)||:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz [following]
--2019-01-15 23:15:16--  https://edelivery.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)..., 2a02:26f0:64:18e::366, 2a02:26f0:64:1b6::366
Connecting to edelivery.oracle.com (edelivery.oracle.com)||:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=15475906                                                     37_9166d63baaaf8c1cb5bbe211d579a825 [following]
--2019-01-15 23:15:16--  http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?Aut                                                     hParam=1547590637_9166d63baaaf8c1cb5bbe211d579a825
Connecting to download.oracle.com (download.oracle.com)||:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?AuthParam=1547590                                                     637_9166d63baaaf8c1cb5bbe211d579a825 [following]
--2019-01-15 23:15:16--  https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz?Au                                                     thParam=1547590637_9166d63baaaf8c1cb5bbe211d579a825
Connecting to download.oracle.com (download.oracle.com)||:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-01-15 23:15:16 ERROR 404: Not Found.

download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is there something I configured wrong in my firewall or what am I missing?


That package is essentially a packaged script for downloading a Java installer from Oracle.com.

It used to work in the heydays of Debian 8 and Java 8 - it does not work anymore, as the specific Java 8 installation file is not anymore in that location.

The world has simply moved on - also from the error, a 404 not found denotes there exists communication, and is not in any way related to blocked ports/firewall. The other side is answering, it is just it is saying "404 - Not Found".

I would advise using an alternative method for installing the Java framework. The openjdk alternative is more than enough for most projects and is easily installed as:

sudo apt-get install openjdk-8-jdk
  • 1
    Just FYI the package (in that it is indeed just a script) has been updated and works as of today. How long it will work for before Oracle breaks it again is unknown – Mitch Jan 17 at 21:36

End of Public Updates for Oracle JDK 8

Oracle will not post further updates of Java SE 8 to its public download sites for commercial use after January 2019. Customers who need continued access to critical bug fixes and security fixes as well as general maintenance for Java SE 8 or previous versions can get long term support through Oracle Java SE Subscription or Oracle Java SE Desktop Subscription. For more information, and details on how to receive longer term support for Oracle JDK 8, please see the Oracle Java SE Support Roadmap.

Copy From : https://www.oracle.com/technetwork/java/javase/overview/index.html

So , You can install Oracle JDK 11 or you can install Oracle JDK 8 Manually


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.