-2

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

1 Answers1

0

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