We are introducing a change in JDK/JRE packages of our distro. This is triggered from the way a JRE is build in modern versions of Java (>9). We are introducing this change in Java 21.

To sum it up instead of having JDK and JRE packages coexist in the same system we will be making them conflict. The JDK variant package includes the runtime environment to execute Java applications so if one needs compilation and runtime of Java they need only the JDK package in the future. If, on the other hand, they need just runtime of Java then JRE (or jre-headless) will work.

This will (potentially) require a manual user action during upgrade:

  • If you have both JDK and JRE installed you can manually install the JDK with pacman -Syu jdk-openjdk and this removes the JRE related packages.
  • If you have both JRE and JRE-headless you will need to choose one of them and install it manually since they would conflict each other now.
  • If you only have one of the JDK/JRE/JRE-headless pacman should resolve dependencies normally and no action is needed.

At the moment this is only valid for the upcoming JDK 21 release.

  • Christian@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    Idiot here. When I use the command pacman -Syu jdk-openjdk, I still get the error:

    error: unresolvable package conflicts detected
    error: failed to prepare transaction (conflicting dependencies)
    :: jdk-openjdk and jre-openjdk are in conflict
    

    It’s identical to the error when I just do pacman -Syu normally. What am I doing wrong?

    Edit: I just removed the jre-openjdk package then updated normally and everything seems fine.

    • Molecular0079@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      The trick was to not use the -u option apparently. I also ran into this issue and that’s how I solved it. Strange how Pacman couldn’t just figure it out on its own.