Java tooling in 2026:

"Install JDK 21."
"Actually keep JDK 26."
"Also set JAVA_HOME to something."
"Gradle will ignore it unless it won't."

Jeez, I just wanted to compile an app not perform an ancient ritual.

@fribbledom never set and export JAVA_HOME globally, that's an ancient JDK 1.1 curse. Never add a jre to a system or user PATH for a non-OS package or development environment, leave that to the OS to manage for OS packages. Set PATH and JAVA_HOME locally within scriots, if necessary.