0

I have a problem with the installation of java (jdk17) on raspian (Raspian 11 (bullseye). I need jdk17 but raspian packagemanager only want to install jdk11 so i decided to use sdkman. Using the tutorial here:https://foojay.io/today/installing-java-with-sdkman-on-raspberry-pi/ I installed sdkman and then java (17.0.6.-zulu), but when I restart the pi java is gone, even java -version does not work.

I look if my sd card is readonly, but it isn't the typed and used commands also remain in the bash history and sdkman files are also at their location after reboot.

How can I install java on my pi?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

2 Answers2

0

Ok, i found a simpler aproach than useing sdkman. Simply use:

sudo apt install openjdk-17-jdk

Still wondering about the use of sdkman...

0

This is because by default, sdkman adds itself to ~/.bashrc which is not executed when you ssh to your machine.

Here is a discussion about it: .bashrc at ssh login

You can add to your ~/.bash_profile:

if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi
Eric Darchis
  • 24,537
  • 4
  • 28
  • 49