Install Java 8 on Ubuntu
Hi all,
In this post, I'm going to show you how to install JDK 8 on Ubuntu 14.04.
Java Platform, Standard Edition 8 is a major feature release. For more details see What's New in JDK 8.
First verify that your Linux distribution doesn't have Java 8 installed by default. To do so, issue the below command through the terminal
java -version
In my case, this is what was returned.
java version "1.7.0_111"
OpenJDK Runtime Environment (IcedTea 2.6.7) (7u111-2.6.7-0ubuntu0.14.04.3)
OpenJDK 64-Bit Server VM (build 24.111-b01, mixed mode)
It says that JDK 7 has been installed. Who cares? I want JDK 8. Depending on your Linux distribution, you may see something like this as well.
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.8-jre-headless
* openjdk-7-jre-headless
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
Try: sudo apt-get install <selected package>
It says that any JDK hasn't been installed.
Now, lets look at how to install JDK 8 on Ubuntu 14.04. First you need to add webupd8team Java PPA repository in your system, using the following command.
sudo add-apt-repository ppa:webupd8team/java
Update the system using,
sudo apt-get update
Finally, install JDK 8 and make it the default JDK using,
sudo apt-get install oracle-java8-set-default
We're done! Now verify the JDK 8 installation, using the following command.
java -version
You should see something like this.
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
Comments
Post a Comment