In this post we will see How to Install Oracle Java 8 on Ubuntu 18.04 via PPA.
Step 1 – Add the PPA
$ sudo add-apt-repository ppa:webupd8team/java
Step 2 – Update and install the installer script
$ sudo apt update $ sudo apt install oracle-java8-installer
Step 3 – Set Java environment variables and Oracle JDK8 as default
$ sudo apt install oracle-java8-set-default
Step 4 – Check Java compiler version
$ javac -version
Step 5 – Set environment
$ echo "export PATH=/usr/local/anaconda2/bin:$PATH" >> /etc/bash.bashrc $ echo "export JAVA_HOME=/usr/lib/jvm/java-8-oracle/" >> /etc/bash.bashrc $ echo "export PATH=$PATH:$JAVA_HOME/bin" >> /etc/bash.bashrc
Video instruction – How to install Oracle Java JDK on Ubuntu Linux (18.04 LTS or 16.04 LTS)
Leave a Reply