Knowledge Articles

How To Install Openjdk-8-jre-headless In Ubuntu 14.04

How To Install Openjdk-8-jre-headless In Ubuntu 14.04


In Ubuntu openjdk version will be available only Openjdk-7-jre but most of the packages will depend on Openjdk-8-jre version that dependencies different packages like libarchive.



For Openjdk-8-jre version install need to update software repos for Java package will get the latesst java installer in to the server.

1.To start the repos update first need to run apt-get update and upgrade those will help to install latest upgrades update,

$apt-get -y -q update
$apt-get -y -q upgrade

2.Now install software repos service and update the java repos to it,

$apt-get -y -q install software-properties-common htop
$add-apt-repository ppa:webupd8team/java
$add-apt-repository ppa:openjdk-r/ppa

3.After update the repos again run apt-get update for latest changes update,

$apt-get -y -q update

4. Once update done run the following for java jdk and jre installations,

$apt-get install openjdk-8-jdk
$apt-get install openjdk-8-jre
$apt-get install Openjdk-8-jre-headless

5.Update java configs on both,

$update-alternatives –config java
$update-alternatives –config javac

6.To validate the installed Java version run the following command,

$java -version
$java -v

Tags:Java version,jdk installation,jre installation,openjdk,openjre,java versions,Java common,Java installer