To resolve the UnsupportedClassVersionError in Jenkins, please install JDK 17, configure it in Manage Jenkins > Global Tool Configuration, and ensure it is selected in the build environment settings of your job prior to executing the SonarQube analysis.