[go: up one dir, main page]

0% found this document useful (0 votes)
19 views1 page

Install Oracle JDK On Linux

This document provides instructions to install Oracle JDK 8 on Ubuntu Server 18.04. It involves downloading the JDK tarball, extracting it, creating a directory to store the packages, copying the files, configuring ownership, updating alternatives to set the Java commands, and editing the environment file to set the PATH and JAVA_HOME variables.

Uploaded by

Dcky Fm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

Install Oracle JDK On Linux

This document provides instructions to install Oracle JDK 8 on Ubuntu Server 18.04. It involves downloading the JDK tarball, extracting it, creating a directory to store the packages, copying the files, configuring ownership, updating alternatives to set the Java commands, and editing the environment file to set the PATH and JAVA_HOME variables.

Uploaded by

Dcky Fm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Install Oracle JDK-8 on Linux

Using Ubuntu Server 18.04.1-LTS


1. Download JDK tarball linux distribution binnary from Oracle.
2. Extract it:
tar -xvf jdk-*.tar.gz
3. create a directory to store the Java compiler packages:
sudo mkdir -p /usr/local/lib/java/jdk1.8.0_181/
4. copy the extract Java content into the newly created directory:
sudo mv jdk1.8.0_181/* /usr/local/lib/java/jdk1.8.0_181/
5. Change group and ownership
sudo chown -R root /usr/local/lib/java
sudo chgrp -R root /usr/local/lib/java
6. configure java:
sudo update-alternatives --install "/usr/bin/java" "java"
"/usr/local/lib/java/jdk1.8.0_181/bin/java" 1010
sudo update-alternatives --install "/usr/bin/javac" "javac"
"/usr/local/lib/java/jdk1.8.0_181/bin/javac" 1010
sudo update-alternatives --install "/usr/bin/javaws" "javaws"
"/usr/local/lib/java/jdk1.8.0_181/bin/javaws" 1010
7. edit file /etc/environment and copy and paste following text into the end of the and save:
PATH={ORIGINAL_PATH}:/usr/local/lib/java/jdk1.8.0_181/bin:/usr/local/lib/java/
jdk1.8.0_181/jre/bin
JAVA_HOME=/usr/local/lib/java/jdk1.8.0_181

You might also like