Ubuntu: Error while installing Oracle JDK 9 Ubuntu 17.10 [duplicate]


This question already has an answer here:

I did a fresh installation of Ubuntu 17.10. Now I'm trying to install Java 9 on Ubuntu. I followed this askubuntu answer and when I run sudo apt-get install oracle-java9-installer this is what I'm getting

Reading package lists... Done  Building dependency tree         Reading state information... Done  The following additional packages will be installed:    gsfonts-x11 oracle-java9-set-default  Suggested packages:    binfmt-support visualvm ttf-baekmuk | ttf-unfonts | ttf-unfonts-core    ttf-kochi-gothic | ttf-sazanami-gothic ttf-kochi-mincho    | ttf-sazanami-mincho ttf-arphic-uming  The following NEW packages will be installed:    gsfonts-x11 oracle-java9-installer oracle-java9-set-default  0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.  5 not fully installed or removed.  Need to get 35.2 kB/42.5 kB of archives.  After this operation, 231 kB of additional disk space will be used.  Do you want to continue? [Y/n]   Get:1 http://ppa.launchpad.net/webupd8team/java/ubuntu artful/main amd64 oracle-java9-installer amd64 9.0.1-1~webupd8~0 [30.8 kB]  Get:2 http://ppa.launchpad.net/webupd8team/java/ubuntu artful/main amd64 oracle-java9-set-default amd64 9.0.1-1~webupd8~0 [4,442 B]  Fetched 35.2 kB in 2s (13.2 kB/s)                     Preconfiguring packages ...  Selecting previously unselected package oracle-java9-installer.  (Reading database ... 256251 files and directories currently installed.)  Preparing to unpack .../oracle-java9-installer_9.0.1-1~webupd8~0_amd64.deb ...  oracle-license-v1-1 license has already been accepted  Unpacking oracle-java9-installer (9.0.1-1~webupd8~0) ...  Setting up oracle-java9-installer (9.0.1-1~webupd8~0) ...  No /var/cache/oracle-jdk9-installer/wgetrc file found.  Creating /var/cache/oracle-jdk9-installer/wgetrc and  using default oracle-java9-installer wgetrc settings for it.  Downloading Oracle Java 9...  --2018-01-17 06:08:30--  http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.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/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz [following]  --2018-01-17 06:08:30--  https://edelivery.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz  Resolving edelivery.oracle.com (edelivery.oracle.com)..., 2402:d000:130:281::2d3e, 2402:d000:130:289::2d3e  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/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz?AuthParam=1516149631_fbfbf47dc4fd2a5e471045e2cd2db76f [following]  --2018-01-17 06:08:33--  http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz?AuthParam=1516149631_fbfbf47dc4fd2a5e471045e2cd2db76f  Connecting to download.oracle.com (download.oracle.com)||:80... connected.  HTTP request sent, awaiting response... 404 Not Found  2018-01-17 06:08:34 ERROR 404: Not Found.    download failed  Oracle JDK 9 is NOT installed.  dpkg: error processing package oracle-java9-installer (--configure):   subprocess installed post-installation script returned error exit status 1  E: Sub-process /usr/bin/dpkg returned an error code (1)  

Why the download fails and Oracle JDK 9 is not installing. How can I fix this ?


I tried to download Oracle Java 9 manually from the official Oracle website at: http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html and the link to download jdk-9.0.4_linux-x64_bin.tar.gz is working. Your other alternative is to install openjdk-9-jdk from the default Ubuntu 17.10 repositories.

Install Oracle Java JDK the manual way

If you have problems getting Java 9 to work properly with React JavaScript library, don't give up because you can have multiple versions of Java installed alongside each other and set the Java version from the terminal by following the instructions in How to set default Java version?.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »