Ubuntu / Linux news and application reviews.

Update: Oracle Java 8 is now stable. Below you'll find instructions on how to install it in Ubuntu / Linux Mint via a PPA repository. The PPA supports JDK8 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).

As a reminder, the WebUpd8 Oracle Java PPA doesn't include any Java binaries, just a script that automatically downloads and install Oracle Java 8. Everything is done automatically so you'll get updates through the update manager for JDK8 which includes JRE8 and the Java browser plugin.

It's also important to note that the Oracle Java 8 installer is considered in alpha and is offered without any guarantees! Use it at your own risk. If you ISP or router blocks the ports used by the Oracle Java 8 download servers, the installation may fail.

If you want to install Oracle Java 7 instead, see THIS post (PPA for all supported Ubuntu / Linux Mint versions).

Debian users will find installation instructions in the following article: How To Install Oracle Java 8 In Debian Via Repository [JDK8]


Install Oracle Java 8 (JDK8 and JRE8) in Ubuntu or Linux Mint


Important: Ubuntu 13.10, 13.04 and 12.10 are no longer supported by Canonical: there will be no security updates and they don't allow uploading new packages to Launchpad PPAs!

Oracle JDK8 installer

Oracle JDK8 installer

The installer provides Oracle Java 8 (which includes Java JDK, JRE and the Java browser plugin). However, you can't only install Oracle JRE - the PPA only provides the full Oracle JDK8 package.

Our PPA supports Ubuntu 15.04, 14.10, 14.04, 12.04 and 10.04 as well as Linux Mint 17.1, 17 and 13. Add the PPA and install Oracle Java 8 (the package provides both JDK8 and JRE8) using the following commands:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Tip: if you're behind a firewall / router that blocks some of the redirects required to download the Oracle Java archive, you can download the JDK tar.gz archive manually and place it under /var/cache/oracle-jdk8-installer - then, installing the "oracle-java8-installer" package will use the local archive instead of trying it to download it itself.

Once installed, running "java -version" in a terminal should output something like this:
andrei@andrei-desktop:~$ java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
Or, "javac -version":
andrei@andrei-desktop:~$ javac -version
javac 1.8.0_31
And so on.


Automated installation (auto accept license)


The installer requires you to accept the Oracle license before the installation begins. This is only required once. If for some reason you need the installation to be automated, you can run the following command to automatically accept the Oracle license:
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections


Switching between Oracle Java 8 and Java 7


Later on, if you want to switch Oracle Java 7, use the following command (make sure "oracle-java7-installer" package is installed):
sudo update-java-alternatives -s java-7-oracle

And, switch back to Oracle Java 8 using:
sudo update-java-alternatives -s java-8-oracle
If you get some warnings when running these two commands, ignore them.


Setting Java environment variables


To automatically set up the Java 8 environment variables, you can install the following package:
sudo apt-get install oracle-java8-set-default

If you've already installed oracle-java6-set-default or oracle-java7-set-default, they will be automatically removed when installing oracle-java8-set-default (and the environment variables will be set for Oracle Java 8 instead).
«
Next
Newer Post
»
Previous
Older Post