Can sonarqube10.4 support Java8 version of business project scanning?

The following steps when trying to build SonarLint from source lead to an error:

mvn clean verify sonar:sonar \                                       
  -Dsonar.projectKey=dp-item-ao \
  -Dsonar.projectName='dp-item-ao' \ \

This is the error one runs in to:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: (default-cli) on project dp-rank-ao-parent: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin: failed: An API incompatibility was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plugin: java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/guoqingdong/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/
[ERROR] urls[1] = file:/Users/guoqingdong/.m2/repository/org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
[ERROR] urls[2] = file:/Users/guoqingdong/.m2/repository/org/codehaus/plexus/plexus-utils/3.4.1/plexus-utils-3.4.1.jar
[ERROR] urls[3] = file:/Users/guoqingdong/.m2/repository/org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
[ERROR] urls[4] = file:/Users/guoqingdong/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/
[ERROR] urls[5] = file:/Users/guoqingdong/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
guoqingdong@guoqingdongdeMacBook-Pro dp-rank-ao % vim ~/.bash_profile

the test project JDK version is 8. Can sonarqube10.4 support Java8 version of business project scanning?

Hey there.

Take a look at the Scanner Environment documentation – basically, you should build with Java 8 but analyze with Java 17.