Install Java JDK 7 on Ubuntu
###Install Java JDK 7 on Ubuntu
This package provides Oracle Java JDK 7 (which includes JRE, the Java browser plugin and JavaFX). However, you can’t only install Oracle JRE – the PPA only provides the full Oracle JDK7 package.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-jdk7-installer
update-alternatives –display java
java -version
If all went right the answer should be something like this:
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10) Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)'
javac -version
The correct answer should be like this:
javac 1.7.0_07
sudo pico /etc/environment
Append to the end of the file:
JAVA_HOME=/usr/lib/jvm/java-7-oracle
sudo apt-get remove oracle-jdk7-installer