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:

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

Conclusion

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:

About the author

Ahmed Bouchefra
is a web developer with 5+ years of experience and technical author with an engineering degree on software development. You can hire him with a click on the link above or contact him via his LinkedIn account. He authored technical content for the industry-leading websites such as SitePoint, Smashing, DigitalOcean, RealPython, freeCodeCamp, JScrambler, Pusher, and Auth0. He also co-authored various books about modern web development that you can find from Amazon or Leanpub


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.


Online Courses (Affiliate)

If you prefer learning with videos. Check out one of the best Angular courses online
Angular 8 - The Complete Guide (2019+ Edition)

Angular Crash Course for Busy Developers

comments powered by Disqus
DMCA.com Protection Status