I am running the Nix operating system (nixos). When opening some java/gradle projects I got the following error (only visible in the logs in ~/.cache/JetBrains/IdeaIC2024.3/log/idea.log
):
Caused by: org.gradle.api.GradleException: Unable to determine version for JDK located at /home/my_user_name/.jdks/azul-17.0.13. Reason: Command returned unexpected result code: 127
Error output:
Could not start dynamically linked executable: /home/my_user_name/.jdks/azul-17.0.13/bin/java
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
I could resolve it by changing the gradle JVM:
For installing Java on NixOS also see https://nixos.wiki/wiki/Java.