- These instructions are intended specifically for installing Oracle Java 8 on Ubuntu 14.04 LTS.
- I’ll be working from a Liquid Web Core Managed Ubuntu 14.04 LTS server with Apache and PHP installed, and I’ll be logged in as a non-root user. If you need more information then visit our tutorial on How to Add a User and Grant Root Privileges on Ubuntu 14.04 LTS.
sudo apt-add-repository ppa:webupd8team/java
sudo apt-add-repository ppa:webupd8team/javaUpdate apt-get once more:
sudo apt-get updateKick off the installer to completely install Java from the PPA.
sudo apt-get install oracle-java8-installerBe sure to accept the Oracle license!
Step #3: Verify Installation
Now verify that Java is installed and is of version 1.8.x:
Your result should be similar to:
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
Temporarily Set the JAVA_HOME variable
Use the export command for the JAVA_HOME variable to show up as an environmental variable, one that can be used by future child processes:
Permanently Set the JAVA_HOME variable
Insert the following into the bottom .bashrc file:
For changes to the .bashrc file to be recognize run the following command: