.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
报错如上
通义千问的回答:
The error message you're encountering indicates that you're trying to run SonarQube with a version of the Java Runtime Environment (JRE) or Java Development Kit (JDK) that is too old for the version of SonarQube you're using.
The UnsupportedClassVersionError
specifically points out that the class file version (61.0
) is not supported by your current Java runtime, which only supports up to version 52.0
. Class file versions correspond to specific Java SE versions as follows:
- Class file version
52.0
corresponds to Java SE 8. - Class file version
61.0
corresponds to Java SE 17.
解决办法:
Windows设置正确的JAVA_HOME=D:\TOOLS\jdk-17.0.8.7-hotspot
ORACLE JDK 1.7 官方下载