# Java version for SonarScanner vs. SonarQube server version?

**URL:** <https://community.sonarsource.com/t/java-version-for-sonarscanner-vs-sonarqube-server-version/53788>\
**Category:** SonarQube Server / Community Build\
**Created:** [November 25, 2021, 4:13pm UTC](https://community.sonarsource.com/t/java-version-for-sonarscanner-vs-sonarqube-server-version/53788 "2021-11-25T16:13:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Deasy](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/david_deasy/32/22694_2.png) [@David\_Deasy](https://community.sonarsource.com/u/David_Deasy)\
**Post date:** [November 25, 2021, 4:13pm UTC](https://community.sonarsource.com/t/java-version-for-sonarscanner-vs-sonarqube-server-version/53788/1 "2021-11-25T16:13:21Z")

</div>

I have 2 SonarQube servers:  
old server: SonarQube Community Edition Version 7.6 (build 21501)  
new server: \* Developer Edition Version 9.1 (build 47736)

My Jenkins jobs use Java 8 and the old jobs for the old SQ server work ok, but new jobs for the new SQ server are getting the UnsupportedClassVersionError error

> **15:18:41** java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Same Jenkins both servers, has SonarQube Scanner plugin 2.13.1.  
All using SonarQube scanner 4.6.2.2472

Seems clear that we need to move to Java 11 at least for the SonarScanner stage of the build.  
I am just trying to understand why the jenkins builds for the old SonarQube server still work but jenkins builds (same jenkins server) for the new SQ server get the UnsupportedClassVersionError error.

Does the version of scanner run on jenkins depend on the remote SonarQube server?

---

<div class="post-metadata">

**Author:** ![David\_Deasy](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/david_deasy/32/22694_2.png) [@David\_Deasy](https://community.sonarsource.com/u/David_Deasy)\
**Post date:** [November 25, 2021, 4:41pm UTC](https://community.sonarsource.com/t/java-version-for-sonarscanner-vs-sonarqube-server-version/53788/2 "2021-11-25T16:41:27Z")

</div>

Sorry, I guess the answer is there in front of me in the log files from ‘sonar-scanner -X’:

old/working on Java 8:

> DEBUG: Download [https://sonar.devops.path.com/batch/file?name=sonar-scanner-engine-shaded-7.6-all.jar](https://sonar.devops.path.com/batch/file?name=sonar-scanner-engine-shaded-7.6-all.jar) to /home/jenkins/.sonar/cache/\_tmp/fileCache3131174964753019422.tmp

new/UnsupportedClassVersionError error on Java 8:

> DEBUG: Download [https://new.sonarqube.path.com/batch/file?name=scanner-developer-9.1.0.47736-all.jar](https://new.sonarqube.path.com/batch/file?name=scanner-developer-9.1.0.47736-all.jar) to /home/jenkins/.sonar/cache/\_tmp/fileCache7505328857628905196.tmp

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [December 6, 2021, 7:02pm UTC](https://community.sonarsource.com/t/java-version-for-sonarscanner-vs-sonarqube-server-version/53788/3 "2021-12-06T19:02:37Z")

</div>

Closed on December 6, 2021, 7:02pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
