Prism Launcher not detecting proper Java version

Hi! I’m new to this forum, and pretty new to NixOS.

I have an issue running my Prism Launcher instances for Minecraft. They use version 1.20.6, which require Java version 21. I’m not able to get it installed through NixOS, at least in a way that makes it detectable to Prism Launcher.

The prismlauncher package is apparently supposed to come with Java, and I’m pretty sure it did with Java 17 and 8, but for me 21 isn’t there. This means either the package is outdated or I messed up installing Prism Launcher. I just have prismlauncher in environment.systemPackages, and I’ve updated NixOS to 24.05, so I don’t know I could’ve installed it wrong.

I’ve tried installing the jdk, zulu, temurin-bin, and temurin-jre-bin packages, but they don’t get detected by Prism Launcher. Am I doing something wrong here or should I report this?

Welcome :wave:

From the Minecraft - NixOS Wiki, you need to override the prismlauncher package with the jdks you need. For example:

# configuration.nix
  environment.systemPackages = with pkgs; [
    (prismlauncher.override {
      jdks = [
        temurin-bin-21
        temurin-bin-8
        temurin-bin-17
      ];
    })
  ];

That did it, thank you! I looked and saw the jdks option in prismlauncher-unwrapped, although it worked just fine with prismlauncher.override.

1 Like