Ubuntu LTS 14.04: Fix Java 1.8 issues

Quick shot for fixing issues with missing Java 1.8:

1. Add PPAs

Get yourself the right PPA – apparently JDK 1.8 is still not available for Ubuntu 14.04 (correct me if I’m wrong though), thus:

sudo apt-add-repository ppa:openjdk-r/ppa
sudo add-apt-repository ppa:maarten-fonville/ppa
sudo apt-get update

Source: https://askubuntu.com/a/613324

As I’m happily using Synaptic, the next line would probably be: synaptic-pkexec 😉

You’d like to look for openjdk-8 and install everything you need (usually jre, jdk and headless packages).

For commandline users, that should probably do it:

sudo apt-get install openjdk-8-jdk openjdk-8-jre openjdk-8-headless

2. Switch to correct Java version

Right now, after installing the new JDK, nothing should have changed, you’re still at Java 1.7. Now, you need to use update-alternatives to manually switch over to JRE 8 🙂

sudo update-alternatives --config java

Source: https://askubuntu.com/a/740782

In my case, I needed to select /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java – notice the “8” in “java-8-openjdk”. And then: Its done!

Leave a Reply

Your email address will not be published. Required fields are marked *