1

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.

Nicolas Raoul
  • 11,603
  • Refer the URL http://askubuntu.com/questions/183867/how-do-i-update-oracle-java-7-jdk-and-jre for updating Java. – user2205803 May 15 '14 at 06:54

1 Answers1

7

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
lschuetze
  • 196
  • "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 – Jaken Mar 27 '15 at 00:16