How to Download & Install &Run JAVA JDK On Ubuntu Debian Step By Step in Hindi Cyberpoint 9

Опубликовано: 26 Май 2026
на канале: CyberPoint Solution
239
5

In this video I am going to show you How to install Java JDK 10 on Ubuntu 18.04. In order to install Oracle Java JDK 1o On Ubuntu 18.04 just open the terminal and give these commands

Java Installation (PPA)

sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get update
sudo apt-get install oracle-java10-installer

Setting up environment variables (make java10 default)

sudo apt-get install oracle-java10-set-default
Try Also These Commands

sudo apt-get install default-jre

sudo apt-get install default-jdk

The same procedure of How to install Java JDK 10 can be followed on Ubuntu 16.04, Linux Mint, Debian and other related Linux systems.

Java is one of the most popular programming languages in the world, used for building different types of cross-platform applications.

This tutorial describes how to install various versions of OpenJDK as well as Oracle Java on Ubuntu 18.04. The same instructions apply for Ubuntu 16.04 and any Ubuntu-based distribution, including Kubuntu, Linux Mint and Elementary OS.

Prerequisites
Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges.


Java variations
Java is distributed in three different editions, Standard Edition (SE), Enterprise Edition (EE), and Micro Edition (ME). This tutorial covers the installation of the Java SE (Standard Edition) edition.

OpenJDK and Oracle Java are the two main implementations of Java, with almost no differences between them except that Oracle Java has a few additional commercial features.

There are two different Java packages in Ubuntu repositories, Java Runtime Environment (JRE) and the Java Development Kit (JDK). If you only want to run Java programs then you need JRE which contains only the Java Runtime Environment and if you are Java developer then you will need JDK which also includes the development/debugging tools and libraries.

We will show you how to install various Java packages. If you don’t know which Java implementation or version to use, the general recommendation is to stick with the default OpenJDK version available on Ubuntu 18.04.


Installing the Default OpenJDK (Java 11)
At the time of writing, the latest LTS version of Java is version 11.

Follow the steps below to install Java OpenJDK 11 on your Ubuntu system:

First, update the apt package index with:

sudo apt update
Copy
Once the package index is updated install the default Java OpenJDK package with:

sudo apt install default-jdk
Copy
Verify the installation, by running the following command which will print the Java version:

java -version
Copy
The output will look something like this:

openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment (build 11.0.2+9-Ubuntu-3ubuntu118.04.3)
OpenJDK 64-Bit Server VM (build 11.0.2+9-Ubuntu-3ubuntu118.04.3, mixed mode, sharing)
Copy
That’s it! At this point, you should have successfully installed Java on your Ubuntu system.

JRE is included in the JDK package. If you need only JRE, install the default-jre package:
Installing OpenJDK 8
Java 8 is still the most widely-used version of Java. If your application requires Java 8 you can install it by typing the following commands:

sudo apt update
sudo apt install openjdk-8-jdk
Copy
Installing Oracle Java
Before installing Oracle Java make sure you read the Oracle JDK License. The license permits only non-commercial use of the software, such as personal use and development use.


Oracle Java 11 can be installed from the Linux Uprising PPA.

The following steps describe how to install Oracle Java 11 on Ubuntu 18.04:

Install the dependencies necessary to add a new repository:

sudo apt install software-properties-common
Copy
Enable the Linux Uprising PPA by running the following commands:

sudo add-apt-repository ppa:linuxuprising/java
Copy
Once the repository is added, update the packages list and install the oracle-java11-installer package by typing:

sudo apt update
sudo apt install oracle-java11-installer
Copy
You will be prompted to accept the Oracle license.

Verify the installation by running the following command which will print the R version:

java -version
Copy
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
Copy
Set the Default Java Version
To check the default Java version you would use the following command: