Updating Ubuntu Linux to Java 8

Java 8 is available now, but by default Java 7 installs through the Ubuntu Software Center. That is fine for most applications, but some games like MineCraft require the latest version of Java to be installed to run. To update to Java 8 first add Java 8 to your repository, update it, and then install it. The exact instructions are below…

Step 1. From the terminal enter the text…

sudo add-apt-repository ppa:webupd8team/java

Hit the enter key and enter your root user or super user password and hit enter.

Step 2. Enter the text…

sudo apt-get update

Hit the enter key and enter your password again if necessary.

Step 3. If you want to set Java 8 as the default version replacing the old version (why not?) enter the text…

sudo apt-get install oracle-java8-set-default

or if you want to install it, but keep 7 as the default or if you are installing Java for the first time enter the text…

sudo apt-get install oracle-java8-installer

Step 4. If you choose to keep the old version and want to switch between the two use the command…

sudo updatejava-alternatives -s java-8-oracle

and

sudo updatejava-alternatives -s java-7-oracle

to switch between the two versions.

Hope that helps!

 

 

Leave a Reply