I have written a couple of posts on new features in Java 8 (See Related Links section at the bottom of this page).
In this post we will see how to install and configure Java 8 on Ubuntu. Current Java version that is set on my machine in Java7.
Installing Java 8
To install Java run the following commands -
- sudo add-apt-repository ppa:webupd8team/java
- sudo apt-get update
- sudo apt-get install oracle-java8-installer
Once you have run above commands you can verify the installation by running following command
- java -version
Webupd8 ppa repository also provides package to set environment variables. Run following command for it
- sudo apt-get install oracle-java8-set-default
NOTE : If you've already installed oracle-java6-set-default or oracle-java7-set-default, they will be automatically removed when installing oracle-java8-set-default (and the environment variables will be set for Oracle Java 8 instead).