All java, javac, and related JVM commands must be prefixed with mise exec -- to ensure the correct Java version (as specified by mise) is used. Examples:
mise exec -- java -version
mise exec -- ./gradlew build
mise exec -- ./gradlew testThis applies to any direct java invocation and to any tool that shells out to the JVM.