How to Install Oracle JAVA JDK on Ubuntu 20.04 (with JAVA_HOME) | Suresh Agrawal

Опубликовано: 12 Февраль 2026
на канале: NSG ACADEMY
8,694
163

Step by Step Download, Install and Configure Java in Hindi

Step-1 Download
Always download the tar file of latest oracle java jdk LTS
i.e. jdk-11.0.7_linux-x64_bin.tar.gz on 24th June 2020
Link for Oracle JAVA JDK 11
https://www.oracle.com/java/technolog...

Step-2 Install
1) Goto download folder, right click and open terminal.
Now, Extract downloaded tar file using command
tar -zxvf jdk-11.0.7_linux-x64_bin.tar.gz

2) Create a folder name java in /usr/lib using root permission by following command
cd /usr/lib
sudo mkdir java

3) Move the extracted folder from download section to /usr/lib/java using root permission
by following command
cd ~/Downloads/
sudo mv jdk-11.0.7 /usr/lib/java

Step-3 Configuration
1) Configure java compiler and interpreter i.e. javac and java by following commands
sudo update-alternatives --install /usr/bin/java java /usr/lib/java/jdk-11.0.7/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/java/jdk-11.0.7/bin/javac 1

2) Once check whether javac and java got set properly or not by following commands
java --version
javac --version

3) Set JAVA_HOME variable in environment variable for that open a file by following command
sudo gedit /etc/environment

and paste path of jdk folder at the end as follows
JAVA_HOME="/usr/lib/java/jdk-11.0.7"

4) Refresh environment variable and check whether JAVA_HOME variable got set properly or not by following command
source /etc/environment
echo $JAVA_HOME

5) Once recheck whether java is configured successfully or not by following
command
sudo update-alternatives --config java

►Instruction – If you have 32-bits machine then I suggest go for Oracle
JDK 8 LTS by following link
https://www.oracle.com/java/technolog...

►Click here to subscribe –    / nsgacademy  

►Download NSG Academy Android App – https://rb.gy/skn8vc

►TimeStamps –
00:00 – Introduction of this video
00:28 – How to download Oracle JAVA JDK tar file for Linux
00:38 – What is JDK
01:12 – Which JDK version should be installed
04:04 – How to install Oracle JAVA JDK 11 on Linux
08:12 – How to configure java on Linux
10:00 – How to set JAVA_HOME variable on Linux
12:26 – Thank You 😊

Follow NSG Academy on Social Media
►Facebook –   / nsgacademypune  
►Instagram –   / nsgacademy  
►Twitter –   / nsgacademy_pune  

Visit NSG Academy
►Website – http://www.nsgacademy.in
►Google – https://g.page/nsgacademy_pune

Follow me On Social Media
►Personal Facebook A/c –   / suresh.agrawal.963871  
►Personal Instagram A/c –   / suresh.rp.agrawal