In this tutorial, we are going to see how to install Java 11 on Ubuntu 18.04.
Install Java 11 on Ubuntu 18.04:
This installation also applied to install Java on Ubuntu 14.04,16.04,18.04,18.10 versions as well via PPA.
- Ubuntu 18.04 LTS
- Oracle JDK 11
Step 1: Download the Java package from Oracle Web server and install in your local machine.
sudo add-apt-repository ppa:linuxuprising/java
Step 2: Run below command to update the Ubuntu packages and repositories
sudo apt-get update
Step 3: Run the below command to install the script to start downloading and installing Oracle Java 11 on Ubuntu 18.04.
sudo apt-get install oracle-java11-installer
It will prompt you to get confirmation from you to continue the process [Y/n] type Y and hit enter.
Step 4: After you must accept the oracle-java11-installer license. Press Tab to highlight the Ok button and hit enter.
Step 5: After this, you must also accept the Oracle technology network license agreement.
Step 6: Now you can see the installation progress. Finally, you must see the following log statements saying Done.
Step 7: Check the Java version.
sudo apt-get remove oracle-java11-installer
Happy Learning 🙂