Installing Java 7 (Oracle) in Debian via apt-get

DebianJava 7Apt Get

Debian Problem Overview


Installing Oracle Java 7 in Debian via apt-get repository doesn't seems to work.

apt-get install oracle-java7-installer

Look like apt-get does not recognize oracle-java7-installer.

Debian Solutions


Solution 1 - Debian

Managed to get answer after do some google..

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
# Java 7
apt-get install oracle-java7-installer
# For Java 8 command is:
apt-get install oracle-java8-installer

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAzizSMView Question on Stackoverflow
Solution 1 - DebianAzizSMView Answer on Stackoverflow