And Debian flavored distros.. tested on Mint.
This may be a good idea, for example for Android Studio.
Found from:
http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
First uninstall all Java related previous stuff you may have:
apt-get update
apt-get upgrade
apt-get autoremove
apt-get purge ca-certificates-java default-jre default-jre-headless icedtea-\* icedtea-netx icedtea-netx-common openjdk-\* tzdata-java gcj-\* gcj-jre gcj-jre-headless
apt-get autoremove
apt-get update
Then:
su –
echo “deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main” | tee /etc/apt/sources.list.d/webupd8team-java.list
echo “deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main” | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit
Checking:
root@ary-l750:/home/alain# java -version
java version “1.8.0_60”
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
Yep that’s it, tested and approved.
The guys at webupd8 also have a nice package to set the environment vars and make it default:
apt-get install oracle-java8-set-default