• Menu
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

JavaBeat

Java Tutorial Blog

  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
    • Join Us (JBC)

Install Java 8 in Ubuntu

March 30, 2014 //  by Krishna Srinivasan//  Leave a Comment

This post explains how to install Java 8 in your Ubuntu OS. If you are running Windows OS, it is straight forward to download the EXE file and install it. Even the same way you can do it for Ubuntu by loading the package. However, there is very simple and easy solution in Ubuntu is to download from the repository which is advantage since you would get the notification of any update to the Java version.

At present Java 8 is not by default included in the repository. We have to use the Personal Package Archive (PPA), is a collection of software not included in Ubuntu by default. Here I provide you the details on how to install Java 8 quickly. You just follow the below steps to install it.

  1. Open Terminal and ENter “sudo add-apt-repository ppa:webupd8team/java”
  2. Enter the command “sudo apt-get update”
  3. Enter the command “sudo apt-get install oracle-java8-installer”. If you have already installed the Java 6 or Java 7 and want to replace the Java 8 as the default, then use this command “sudo apt-get install oracle-java8-set-default”. This will remove the old versions and install the Java 8 and set the environment variables for Java 8.
  4. After install if you want to switch to Java 8, enter this command “sudo update-java-alternatives -s java-8-oracle”. In the same way if you want to switch back to Java 7 use this command “sudo update-java-alternatives -s java-7-oracle”.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Once you run the above steps, installation process will start. It would take several minutes to complete the installation.

Ubuntu Java 8 Install

I hope this post would be more useful for those who are working on the Ubuntu environment.

Category: JavaTag: Java 8, Ubuntu

About Krishna Srinivasan

He is Founder and Chief Editor of JavaBeat. He has more than 8+ years of experience on developing Web applications. He writes about Spring, DOJO, JSF, Hibernate and many other emerging technologies in this blog.

Previous Post: « JSF 2 UI Fragment Example
Next Post: Java 8 Lambda Expressions Example »

Reader Interactions

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Follow Us

  • Facebook
  • Pinterest

FEATURED TUTORIALS

New Features in Spring Boot 1.4

Difference Between @RequestParam and @PathVariable in Spring MVC

What is new in Java 6.0 Collections API?

The Java 6.0 Compiler API

Introductiion to Jakarta Struts

What’s new in Struts 2.0? – Struts 2.0 Framework

JavaBeat

Copyright © by JavaBeat · All rights reserved
Privacy Policy | Contact