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

AzizSM picture AzizSM · Mar 21, 2013 · Viewed 124.1k times · Source

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.

Answer

AzizSM picture AzizSM · Mar 21, 2013

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