With fully updated Ubuntu 2014.04, Firefox tells me:

Your Java version is out of date.

How to update Java?

Typing java -version in a terminal tells me:

java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

Typing which java tells me /usr/bin/java.


1 Answer 1


The latest Java 7 is Version 7 Update 55 (date of writing). There are several important security updates that should be installed. To get the Oracle JDK and be provided with updates, too, use Webupd8 (pronounced webupdate) which provide a PPA to deploy Java.

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

UPDATE: In order to install Java 8 just type

sudo apt-get install oracle-java8-installer
  • "Unable to locate package oracle-java8-installer". Before running the add-apt-repository command you should run sudo apt-get purge openjdk* as well as sudo apt-get install software-properties-common
    – Jud
    Mar 27, 2015 at 0:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .