UPDate 2023-11-13 and JAVA: Correct sequence?

I’ve seen the hint from @philm here and as well the one from @Mirdarthos but I don’t find any information about the sequence: :

  • UPdate first, then in case of a conflicct pacman -Syu jdk-openjdk
    OR
  • pacman -Syu jdk-openjdk first, after that the UPdate?

My JAVA-status:

$ pamac search --installed jdk                            
openjdk8-src  8.392.u08-1                                       extra
    OpenJDK Java 8 sources
openjdk8-doc  8.392.u08-1                                       extra
    OpenJDK Java 8 documentation
jre-openjdk-headless  21.u35-3                                  extra
    OpenJDK Java 21 headless runtime environment
jre-openjdk  21.u35-3                                           extra
    OpenJDK Java 21 full runtime environment
jre8-openjdk-headless  8.392.u08-1                              extra
    OpenJDK Java 8 headless runtime environment
jre8-openjdk  8.392.u08-1                                       extra
    OpenJDK Java 8 full runtime environment
jre11-openjdk-headless  11.0.21.u9-2                            extra
    OpenJDK Java 11 headless runtime environment
jre11-openjdk  11.0.21.u9-2                                     extra
    OpenJDK Java 11 full runtime environment
jdk8-openjdk  8.392.u08-1                                       extra
    OpenJDK Java 8 development kit
jdk11-openjdk  11.0.21.u9-2                                     extra
    OpenJDK Java 11 development kit

$ pamac search --installed jre
jre8-openjdk-headless  8.392.u08-1                              extra
    OpenJDK Java 8 headless runtime environment
jre8-openjdk  8.392.u08-1                                       extra
    OpenJDK Java 8 full runtime environment
jre11-openjdk-headless  11.0.21.u9-2                            extra
    OpenJDK Java 11 headless runtime environment
jre11-openjdk  11.0.21.u9-2                                     extra
    OpenJDK Java 11 full runtime environment
jre-openjdk-headless  21.u35-3                                  extra
    OpenJDK Java 21 headless runtime environment
jre-openjdk  21.u35-3                                           extra
    OpenJDK Java 21 full runtime environment

I’m in no way an expert, nor have I ever claimed to be and neither do I really know anything about java*…stuff. But from what I could tell, if you have them both installed, as you seem to have, uninstall 'em, do the update, and then reinstall again. And no, sadly I don’t know if you have to reinstall jdk-, jre- or both.

Either of these methods should achieve your goal:

sudo pacman -Sy jdk-openjdk
# Note: Answer 'Y' (Yes) to remove any conflicting packages
sudo pacman -Syu

… or, using Pamac:

pamac install jdk-openjdk --no-upgrade; pamac update --no-aur

I hope this helps.

2 Likes

Thank you @soundofthunder.
BUT: Run this command prior to the UPdate OR after that?

In both of those cases, the update is also performed.
So, this is arguably all that needs to be done, unless another issue occurs.

Only use one method, not both; The sudo pacman... commands are preferred.

I know everything I need to know, about Java …

Yeah, myself:

In the context of software, well, let’s just say it’s there, and I know it’s there.

In a personal context:

Well, to be honest, the best thing to happen to mankind and the second-best thing to happen to me.

:wink:

1 Like

This change only concers JDK/JRE 21, so versions 17, 11 and 8 need no intervention.

I see you have only JRE21 installed, so:

sudo pacman -Rdd jre-openjdk-headless jre-openjdk
sudo pacman -Syu
sudo pacman -S jre-openjdk

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.