To set up JAVA on Ubuntu
Published in
2 min readOct 16, 2021
So in this article, I am going to explain how to set up Java on Ubuntu.
Step 1: To check whether JAVA is already installed on your Ubuntu OS by using
$ java -version
If there is no Java version installed, the system will say it is unable to find the software
After confirming that JAVA isn’t installed earlier on your system, we can now start installing it
Step 2: Download Oracle Java from Linux Uprising PPA
- Install the required packages if you do not have them on your system yet
$ sudo apt install software-properties-common
- Add the repository with the following command
$ sudo add-apt-repository ppa:linuxuprising/java
- Update the package list before installing any new software
$ sudo apt update
Download and install the latest version of Oracle Java (version number 16):
$ sudo apt install oracle-java16-installer
Step 3: Now verify whether JAVA is installed on your system
$ java -version
Hope this article helped you understand the installation of Java on Ubuntu