Determine which Java/JDK version a Maven or Gradle project actually needs to BUILD (not merely its declared bytecode target), then select and use that JDK so builds, tests, and analysis tools run in a faithfully reproducing environment. Use before compiling, running tests, mutation testing, coverage, or any tooling that forks a JVM and must match the project's real Java version.