I'm having issues finding a way to install Java 17 on my RPi. It seems like anything I do, it either reverts to JDK11 or 16. This would be running the latest Raspbian.

Does anyone have any tips that I could follow to get Java 17 to be the active version?


  • You might want to clarify where you got the tarball from (I think currently oracle is the only source). You'll also need to be using a 64-bit OS.
    – goldilocks
    Nov 28, 2021 at 17:02

2 Answers 2


Have you tried sudo update-alternatives --config java?

This adds symbolic links to your /usr/bin folder. This way your system shouldn't revert back to java11/16 - unless for example the program you're running has their own path to a java installation.

Another option would be to change your PATH in ~.profile or ~.bashrc. You can add your java17 installation path to the PATH like this, but I think you'd have to delete the java11/16 from the path for this to work:



I download the "Full" JDK from BellSoft as it is complied with DIO support for Raspberry Pi and also includes OpenJFX. There are 64 or 32-bit versions:


Get the regular Java SE JDK, not the embedded version.

The .deb installed cleanly on my RPi 3 B.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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