If you have trouble following these instructions, you can download the deb file I made from here:
https://www.informatica-libera.net/files/oracle-java8-jdk_8u231_amd64.deb.
At the moment, there is no working PPA to automatically download and install Oracle Java8 JDK 8u211 or 8u212 or later on Debian / Ubuntu / Linux Mint, because it's strictly necessary to manually download the jdk-8u211-linux-x64.tar.gz or jdk-8u212-linux-x64.tar.gz file from the Oracle site, after logging in:
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
You can transform the jdk-8u212-linux-x64.tar.gz in oracle-java8-jdk_8u212_amd64.deb using make-jpkg provided by java-package.
So, remove any other Java version previously installed from the discontinued Java8 PPA (sudo apt-get remove oracle-java8-installer) then:
-
sudo apt-get install java-package
-
make-jpkg jdk-8u212-linux-x64.tar.gz
-
sudo dpkg -i oracle-java8-jdk_8u212_amd64.deb (or any graphical installer opened by a double click on the deb, like gdebi-gtk)
-
sudo apt-get -f install (to install missing dependencies)
That's all! :-)
Francesco Galgani,
30 April 2019