Issue
I´ve been installing java 8 in debian jessie in this following away below:
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" >> /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
apt-get update && apt-get install oracle-java8-installer -y
but sunddenly , this isn't working anymore.
E: Unable to find the oracle8-java-installer package
i tried this another step below, but i getting the same error:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
Solution
Download (oracle account needed) from
https://www.oracle.com/technetwork/java/javaee/downloads/jdk8-downloads-2133151.html
jdk-8u211-linux-x64.tar.gz
As root
cp jdk-8u211-linux-x64.tar.gz /usr/lib/jvm/
cd /usr/lib/jvm/
tar zxvf jdk-8u211-linux-x64.tar.gz
To set as default run:
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_211/bin/java 4
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_211/bin/javac 4
update-alternatives --config java
Then choose option 4 (because previously run update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_211/bin/java 4)
Source: https://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_jdk.html#BJFJJEFG
Answered By - admlz635