You can analyze code written in any Java version (e.g., Java 8 or Java 15) regardless of the scanner's runtime version. Key Compatibility Details Java 17 Support: SonarQube 8.9
to use Java 11 for the scanner while keeping your build on Java 8? Prerequisites and overview | SonarQube Server 8.9 sonarqube 8.9 supported java version
This is the most common use case. Teams with legacy Java 8 applications rely on SonarQube 8.9 because it maintains near-perfect backward compatibility. Ensure your build pipeline uses a JDK 8 for compilation but the Sonar scanner agent can run on any JDK (11 or higher). sonarqube 8.9 supported java version