

You can now check if JAVA_HOME variable is set by running echo $JAVA_HOME. sudo apt -y install oracle-java8-set-default Set the default path for the JAVA_HOME by installing the following package. Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode) Java(TM) SE Runtime Environment (build 1.8.0_171-b11) You can verify if Java has been installed successfully by running java -version command. sudo apt -y install oracle-java8-installer Sudo add-apt-repository -yes ppa:webupd8team/java sudo apt install -y software-properties-common Here we would like first to introduce how to install Java 8 on Ubuntu 16.04, you can first add the PPA repository for Java. Normally Oracle Java is packed with both Java Runtime (JRE) and JDK.
