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 
< -----SNIPPED TO SAVE SPACE----->
.....
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 10.1.1.10:3142... 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.
.....
< -----SNIPPED TO SAVE SPACE----->

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.

Leave a Reply

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