Recently apt-get install -y oracle-java7-installer
stopped working.
I know in their roadmap, I think the public version is no longer supported, but it\'s be
I just ran into this trying to install Java 6 (don't ask).
Since I'm short on time, I was fine with a quick and dirty answer. I noticed the URL looked for by the installer was http-based (vs https), which makes the below solution possible.
Make sure a web server is installed (I already had Apache on my box)
Download the file that is requested. In your case that is
jdk-7u80-linux-x64.tar.gz
. See Meir Maor's answer above
On your local web server, recreate the path structure requested for the
file. In your case that is otn-pub/java/jdk/7u80-b15
.
Copy the downloaded file into the path above
Edit /etc/hosts and add 127.0.0.1 download.oracle.com
Run apt-get install -y oracle-java7-installer
again.
The installer will now grab the file from your local web server and complete successfully.
There may be a better way to do this, but it worked for me.