Java JDK is the essential part of developer life to run & develop applications. In this tutorial, we are going to see how to install Java JDK on Ubuntu 18.04.
- Open Terminal by pressing Ctrl+ Alt+ T or directly searching from the search bar.
- Run following commands
vikas@machine:~$ sudo add-apt-repository ppa:linuxuprising/java
vikas@machine:~$ sudo apt-get update
vikas@machine:~$ sudo apt-get install oracle-java10-installer
- It will ask you to accept the License Agreement
- After this, you will see the following type of message on the terminal.
- Now we need to run a command to set JDK 10 as default JDK, run the following command for it.
vikas@machine:~$ sudo apt-get install oracle-java10-set-default
- Now run java –version on the terminal you will see the following message when you have configured JDK successfully.
Here your JDK is ready for you.
Please comment it out, if you stuck anywhere or you have doubts or issues with it.