How to install Oracle Java 8 on Ubuntu 14.04 Trusty / LinuxMint 17 Qiana, and how to prepare Eclipse 4.3 Kepler for Java 8

Both Ubuntu and Linux Mint have OpenJDK in their repositories, and that should work fine for most stuff.
But when you are into serious development, especially to install the Eclipse IDE, you need Oracle Java.

To install Oracle Java 8 on Ubuntu 14.04 Trusty / LinuxMint 17 Qiana, use the following commands in Terminal:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

As the installation progresses, you might be asked to accept the Oracle licence/terms.
Use the arrow keys to move between the options, and press ENTER to select the option (Choose Yes/Accept/OK/Continue) and continue with the installation.

Once Oracle Java 8 has been installed,
to set the required Oracle Java 8 environment variables, run the following command:

sudo apt-get install oracle-java8-set-default

Notes on Installing Eclipse:
Eclipse 4.3 Kepler works fine with Oracle Java 7.
(And you can read how to install that here: http://antojose.com/node/43)
But for Java 8, it requires some additional configuration as listed here:

http://stackoverflow.com/questions/17619638/eclipse-kepler-java-8 

The latest Eclipse packages from eclipse.org contains the necessary patches as well.
Eclipse 4.4 Luna (scheduled to be released by the end of June, 2014) should support Java 8 out of the box.

Happy Coding!!!

Add new comment

randomness