To install Oracle Java 8 or Java 7 in Ubuntu 14.04 or Linux Mint we need “webupd8” PPA. This ppa includes the java installer for ubuntu. The installer includes complete Java pack Java JDK, JRE and the Java browser plugin.
Installation is very simple
Install Oracle Java 8 on Ubuntu 14.04 open a terminal window (press Ctrl+Alt+T) and run the commands given below.
sudo add-apt-repository ppa:webupd8team/java -y sudo apt-get update sudo apt-get install oracle-java8-installer -y
This will Install Java 8 on Ubntu 14.04
To Install Oracle Java 7 on Ubuntu 14.04 Run the commands below.
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer
Check your installation with this command
java -version
or
javac -version
Using between Oracle Java 7 and Oracle Java 8
Switch to Oracle Java 8 from Oracle java 7
sudo update-java-alternatives -s java-8-oracle
switch to Oracle Java 7 from Oracle java 8
sudo update-java-alternatives -s java-7-oracle
Related articles
- Ubuntu 14.04 (Trusty Tahr) released (fridge.ubuntu.com)
- The Best Linux Distributions For Windows XP Refugees (makeuseof.com)
- Ubuntu 14.04 ‘Trusty Tahr’ Brings Long-Term Linux Desktop Support (eweek.com)