0

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?

Thanks!

1
  • 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

0

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:

PATH=$PATH:/home/pi/java17/bin.

0

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:

https://bell-sw.com/

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 that you have read and understand our privacy policy and code of conduct.

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