Updating Java on Raspberry Pi

I couldn’t log in any more on my Unifi Controller after updating the controller on my Raspberry Pi to version 5.10.12. All I got was a blank screen 🙁

After some digging around I noticed that Java needed to be updated. Rasbian is shipped with an outdated version of Java and for the Unifi Controller we need at least version 1.8.0_201. So in this article I am going to explain how you can update the Raspberry Pi Java version.

Updating Java

We are going to update Java on the PI. The problem is that the latest versions of Java isn’t available in the default repositories for Raspbian. So we need to add the correct repository manually to update Java.

Login to your PI with Putty or your preferred CLI (command line interface) tool. First remove the OpenJDK:

Add a digital key so we can authorize the repository

Add the packet source

Add the repository

Install the latest version of Java 8

Remove the old Java version

Check if we have the latest version of Java:

You Java Version on your Raspberry Pi should now be updated to the latest version. If you have the Unifi Controller running on it, all you need to do is reboot the Pi (sudo reboot).

Get more stuff like this

IT, Office365, Smart Home, PowerShell and Blogging Tips

I hate spam to, so you can unsubscribe at any time.

5 thoughts on “Updating Java on Raspberry Pi”

  1. thank you sir!

    i upgraded from 5.9.x to 5.10.17 and was wondering why it wouldnt start. followed this java update guide and back up and running now

  2. Hi Ruud,
    First of all thanks for enlightening all of us with your bits of knowledge.
    When going through your instructions the third line (sudo vim /etc/apt/sources.list) returns an error (sudo: vim: opdracht niet gevonden).
    How to proceed from here?

    Thanks!

  3. Thank you. I have Unifi Controller and OpenHabian running on my RPi, and couldn’t use Zulu Embedded Java as recommended by OpenHabian as it wasn’t yet on level 201. Using Oracle Java package allowed both two services run fine.

Leave a Comment