Documente Academic
Documente Profesional
Documente Cultură
Java is a set of software and specifications developed at Sun Microsystems. There are two
tyes of Java Platforms are JDK (Java Development Kit) and JRE (Java Runtime
Environment). Both are helpful for deploying applications on servers and debugging, JVM
monitoring,developing.
Java 8 Features:
Java 8 provides following features,
ForEach() method
Functional interfaces
Base64 Encode Decode
Parallel array sorting
Nashorn JavaScript Engine,
Parallel Array Sorting
Type and Repating Annotations
java.lang and java.util Packages
To know more detailed features go through this link.
Prerequisites
Ubuntu Server 16.04/18.04 LTS
SSH access with sudo privileges
To check Ubuntu version:
$ uname -a
OR
$ cat /etc/os-release
Output:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.5 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.5 LTS"
VERSION_ID="16.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
Follow the below steps to Install Oracle Java 8 on Ubuntu Manually using command line.
This link takes you to the Oracle home website Oracel Java SRE.
Once you opened above link goto “JAVA SE Development Kit 8u231” section, click on
“Accept License Agreement” Radio button and download “jdk-8u231-linux-x64.tar.gz”
setup for ubuntu
After downloading into local machine, using SCP/SFTP/FTP transfer the file from local
machine to Ubuntu server.
Copy the tar file from the directory copied from local machine to server to /opt/jdk folder
and execute below command:
# ls
Output:
Note : Its not particularly o/p if you have installed open jdk before
Step 4: Verify Update Alternatives
Enter below command shows output:
Output:
Output
------------------------------------------------------------
JAVA_HOME=/opt/jdk/jdk1.8.0_231
JRE_HOME=/opt/jdk/jdk1.8.0_231/jre
$ source /etc/environment
$ echo $JAVA_HOME
Output:
/opt/jdk/jdk1.8.0_231
Output:
java version "1.8.0_231"
If you seeing output like above then we have successfully set up the Java 8 on Ubuntu.
Conclusion
In this article, We have downloaded Oracle Java 8 from official site, installed using
command line, configured JAVA_HOME and JRE_HOME, verified installed
version.