Ubuntu 14.04: Issues installing java using oracle-java9-installer package

Java Logo
Print Friendly, PDF & Email

I had the issue today of not being able to install Java as can be seen below. (I snipped a lot of the garbage that we don’t need to see for the solution)

hendri@techedemic:~$ sudo apt-get install oracle-java9-installer 
Do you want to continue? [Y/n] y
Setting up oracle-java9-installer (9b81+9b81arm-1~webupd8~1) ...
Downloading Oracle Java 9...
--2015-09-30 14:35:17--  http://www.java.net/download/jdk9/archive/b81/binaries/jdk-9-ea-bin-b81-linux-x64-09_sep_2015.tar.gz
Connecting to connected.
Proxy request sent, awaiting response... 403 Sorry, not allowed to fetch that type of file: jdk-9-ea-bin-b81-linux-x64-09_sep_2015.tar.gz
2015-09-30 14:35:17 ERROR 403: Sorry, not allowed to fetch that type of file: jdk-9-ea-bin-b81-linux-x64-09_sep_2015.tar.gz.
download failed
Oracle JDK 9 is NOT installed.

To fix this, create a file name 01Proxy in /etc/apt/apt.conf.d/

hendri@techedemic:~$ cd /etc/apt/apt.conf.d/
hendri@techedemic:~$ sudo touch 01Proxy

and then add the following line to the file.

Acquire::http::Proxy { download.oracle.com DIRECT; };

Save the file and try again. It should work now.

Share and Enjoy !

0 0 0

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.