I updated my Raspberry Pi to JDK 16 by following part of this tutorial: https://linuxhint.com/install-oracle-java-jdk-16-raspberry-pi/

It worked just fine (when I do java --version, it displayed JDK 16) until today, where it suddenly went back to JDK 11. I checked the $PATH and nothing seems to be wrong, and it is still set to the JDK 16 folder (and I rebooted it many times). So why is doing java --version still giving me JDK 11?

enter image description here

  • Don't paste pictures of text post TEXT.
    – Milliways
    Oct 31, 2021 at 3:41

1 Answer 1


Managed to fix the error by referring to this: https://www.reddit.com/r/raspberry_pi/comments/nxdva3/install_java_16_on_raspberry_pi/

I used the command: export PATH=/opt/jdk-16.0.1+4/bin:$PATH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.