4

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
0

2 Answers 2

2

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
0
1

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.

Not the answer you're looking for? Browse other questions tagged .