How to Install JAVA 8 (OpenJDK 8) on Ubuntu 19.04
The stable version of Java 8 (1.8) has been released on 18 2014.You can download it from the official website.Java 8 has new features(like lambdas and functional programming) and security updates, you can get more information of what's new in Java 8 from this link.
If you are under Ubuntu 19.04, you can install Java 8 using OpenJDK 8.
Installing Java 8 on Ubuntu 19.04
To install OpenJDK 8 in Ubuntu 19.04, you have two methods:
- Download the OpenJDK 8 package manually from its Ubuntu 18.10 repository,
- Use OpenJDK builds PPA.
Installing Java 8 (OpenJDK) Using Ubuntu 18.10 Repository:
Let's start by seeing how you can install OpenJDK 8 via Ubuntu 18.01 repository
First, you need to download the following packages for 64-bit systems:
For 32-bit systems check this link.
Next, you siply need to use the dpkg tool to install these packages. Open your terminal, go to where you have downloade the packages and run the following command:
$ sudo dpkg -i ./openjdk-8-*.deb
If the setup fails due to dependency problems. Simply run the following command:
$ sudo apt -f install
That's it! You now have installed Java 8 on your Ubuntu 19.04 system using Ubuntu 18.04 repository.
Installing Java 8 (OpenJDK) In Ubuntu 19.04 via a PPA
You can also install OpenJDK 8 via a PPA. Open your terminal and run the following command:
$ sudo add-apt-repository ppa:openjdk-r/ppa
You'll be prompted for your sudo password. Enter it and hit Enter.
Next, you can simply install Java 8 (OpenJDK) by running the following commands:
$ sudo apt update $ sudo apt install openjdk-8-jdk openjdk-8-jre
So we have seen how you can install Java 8 (OpenJDK 8 ) on your Ubuntu 19.04 system using packages from Ubuntu 18.04 and a PPA.
Note: We also publish our tutorials on Medium and DEV.to. If you prefer reading in these platforms, you can follow us there to get our newest articles.
You can reach the author via Twitter:Follow @ahmedbouchefra
About the author
Get our Learn Angular 8 in 15 Easy Steps ebook in pdf, epub and mobi formats, plus a new Angular 8 tutorial every 3 days.
Read our other tutorials
- Angular Tutorial
- Laravel 6 Tutorial
- React Tutorial
- React Hooks Tutorial
- React Native Tutorial
- Webpack Tutorial
- PHP Tutorial
- Django Tutorial
- Java Spring Tutorial
- Rails 6 Tutorial
- Ionic 4 Tutorial
- TypeScript Tutorial
- Bootstrap 4 Tutorial
- Electron Tutorial
- Cordova Tutorial
- HTML Tutorial
- GraphQL Tutorial
- CSS Grid Layout Tutorial
- PWA Tutorial