8

This question already has an answer here:

Is there a way to install Oracle Java 8 on Ubuntu 19.04?

The webupd8team/java ppa is empty at the time writing.

marked as duplicate by Kulfy, Eric Carvalho, vidarlo, Fabby, karel Apr 28 at 9:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

12

I just upgraded to Ubuntu 19.04 on Sunday and had this exact same problem the webupd8team PPA was removed due to the recent Oracle license changes.

I solved the problem using this script from GitHub: install-java.sh

It is a Bash script that did a professional install of Oracle JDK 1.8_201 using the files I downloaded from Oracle's website. I have just used it today and selected yes to everything. It works like a charm on Ubuntu 19.04. I ran with with the following files that I downloaded from Oracle:

-rwxrwxrwx 1 don don      8409 Sep 26  2018 jce_policy-8.zip
-rwxrwxrwx 1 don don  58807261 Jan 21 22:56 jdk-8u201-linux-x64-demos.tar.gz
-rwxrwxrwx 1 don don 191817140 Jan 21 22:50 jdk-8u201-linux-x64.tar.gz

It installs JDK into /usr/lib/jvm and adds the programs (java, javac, etc.) to /usr/bin, and will update or add JAVA_HOME to your bashrc file.

I tested the installation by running a GUI Java program from my desktop. Everything is working perfectly.

  • I would like to add that some files and folders ended up with another owner and or group id so I fixed that with $ sudo chown -R root:root /usr/lib/jvm/jdk1.8.0_201/ – Don Apr 24 at 23:16
  • exactly what I needed, works like a charm, thanks! – RaptoX May 27 at 13:43
  • 1
    install_java.sh: 24: install_java.sh: Syntax error: "(" unexpected – Rajamohan S Jul 21 at 3:09
  • It works fine for me with Oracle JDK 8u221, in fact the author recently updated the script on GitHub and added some improvements. I recommend posting the full details of your error as a separate question and include the script link and the distribution file you are trying to install, and the command line syntax you used. Your error appears to be a unique issue/question. – Don Jul 21 at 17:53
  • 1
    @cellsuicide, Yes I resolved it by installing Open JDK version 8. Here is the link openjdk.java.net/install .. $ sudo apt-get install openjdk-8-jdk . OpenJDK is completely open source and can be used it freely. – Rajamohan S Jul 24 at 11:16
-1

Did you try installing headless jdk? as following?

sudo dpkg --configure -a
sudo apt-get install openjdk-8-jdk-headless -y --force-yes
  • 1
    OP was asking for Oracle Java 8 – zalpha314 May 31 at 2:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.