webupd8 oracle-java-7-installer failing with 404

Since Oracle has moved the download link and requires login credentials to download older versions of java, follow the following steps to install java 7:

1) Download latest java version from http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html. You will need to login.

2) Delete jdk-7uXX-linux-x64.tar.gz from /var/cache/oracle-jdk7-installer/ where XX is the version number.

3) Move the downloaded version into /var/cache/oracle-jdk7-installer/ using the following command

sudo mv jdk-7u(downloadedversion)-linux-x64.tar.gz /var/cache/oracle-jdk7-installer/


4) Now run the following command

sudo apt-get install oracle-java7-installer




The cause of the error is Oracle's removal of the binaries from their site. Though the versions were deprecated a while ago, the binaries were still there for download until recently. But they removed it now.

This is explained in webupd8's site on June 2,2017. Oracle's download page says

Updates for Java SE 7 released after April 2015, and updates for Java SE 6 released after April 2013 are only available to Oracle Customers through My Oracle Support (requires support login).

Java SE Advanced offers users commercial features, access to critical bug fixes, security fixes, and general maintenance".

Check the full details here http://www.webupd8.org/2017/06/why-oracle-java-7-and-6-installers-no.html.

Tags:

Java

Oracle