Ubuntu Server 14.04.3 LTS & Java

Oracle Java 8
1. # apt
-add-repository ppa:webupd8team/java

2. # apt-get update

3. # apt-get install oracle-java8-installer

Set JAVA_HOME variable

# export JAVA_HOME=/usr/lib/jvm/java-8-oracle