Oracle Java 8 was released yesterday and it can be installed in Debian by using the WebUpd8 Java PPA repository.
Usually, the packages available in Launchpad PPAs don't support Debian because they are built against specific Ubuntu libraries, but since the WebUpd8 Oracle Java PPA contains just an installer, it works on Debian too.
Using this PPA repository, you'll be able to install Oracle Java 8 (which includes both JRE8 and JDK8) in Debian for both 32bit and 64bit as well as ARM (ARM v6/v7 Hard Float ABI - there's no JDK 8 ARM Soft Float ABI archive available for download on Oracle's website).
The installer automatically downloads and installs Oracle JDK8, but no actual Java files are available in our repository (that's not allowed by the Oracle Java license).
For Ubuntu / Linux Mint installation instructions, see: Install Oracle Java 8 In Ubuntu Via PPA Repository [JDK8]
Install Oracle Java 8 (both JDK8 and JRE8) in Debian
|Tested on Debian Wheezy but it should work with any Debian version|
To add the WebUpd8 Oracle Java PPA repository and install Oracle Java 8 in Debian, use the following commands:
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
And that's it, Oracle Java 8 should now be installed and you should get automatic updates for future Oracle Java 8 versions, under Debian.
You can check out the Java version on your system by using these commands:
This should display something like this:
java version "1.8.0" Java(TM) SE Runtime Environment (build 1.8.0-b132) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
Which will display:
For how to install Oracle Java 7 in Debian, see THIS article.
How to accept the Oracle JDK8 license automatically
The Oracle Java 8 installer requires you to accept the Oracle license before the installation begins. If for some reason you want to accept the license automatically, you can use the following command:
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
How to set the Java environment variables
There is a package in our repository that automatically sets the Java 8 environment variables and sets JDK8 as the default JDK. To install it, use the following command:
If you've already installed oracle-java6-set-default or oracle-java7-set-default, they will be automatically removed when installing oracle-java7-set-default (and the environment variables will be set for Oracle Java 8 instead).
sudo apt-get install oracle-java8-set-default