3

This question already has an answer here:

I have added a repo by doing:

add-apt-repository ppa:webupd8team/java
apt-get install oracle-java8-installer

output:

Package 'oracle-java8-installer' has no installation candidate

marked as duplicate by Pilot6, Fabby, Eliah Kagan, Mike, Pablo A Oct 2 at 23:17

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.

0

If you want to use the Oracle JDK, you need to download the .tar.gz archive from the Oracle JDK website. From there, open a terminal and copy or move the file to /usr/jdk (you might need to create the directory "jdk" first) by using cp <path to downloaded file> /usr/jdk/<desired filename> and extract it with tar -zxvf <the filename>. If you have difficulty with this I recommend checking out Oracle's documentation. It is very helpful. Also, if you don't need version 8 and could do with JDK 11 or 12 there is a .deb package for these newer versions that makes installing and enabling the jdk much easier.

0

The PPA your added has been discontinued due to licensing changes.

Use this new PPA for Oracle Java 11 and 12 (not OpenJDK). Since Java is backward compatible, all your Java 8 programs should work in Java 11 (at least in theory).

sudo add-apt-repository ppa:linuxuprising/java
sudo apt update
sudo apt install oracle-java11-installer

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