# Java 11 code scanning with sonarcloud

**URL:** <https://community.sonarsource.com/t/java-11-code-scanning-with-sonarcloud/142610>\
**Category:** SonarQube Cloud\
**Created:** [June 11, 2025, 10:31am UTC](https://community.sonarsource.com/t/java-11-code-scanning-with-sonarcloud/142610 "2025-06-11T10:31:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Gangaraju](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/krishna_gangaraju/32/69995_2.png) [@Krishna\_Gangaraju](https://community.sonarsource.com/u/Krishna_Gangaraju)\
**Post date:** [June 11, 2025, 10:31am UTC](https://community.sonarsource.com/t/java-11-code-scanning-with-sonarcloud/142610/1 "2025-06-11T10:31:25Z")

</div>

my java project on java 11 (corretto-11) , we are using id ‘org.sonarqube’ version ‘3.3’ plugin

and below configuration for sonar cloud in gradle file

```auto
sonarqube {
    properties {
        property 'sonar.projectKey', 'xxxxx'
        property 'sonar.organization', 'xxxx'
        property 'sonar.host.url', 'https://sonarcloud.io'
        property 'sonar.login', 'secret'
    }
}

```

i’m getting below error

```auto
> Task :sonarqube FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sonarqube'.
> 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 55.0

```

---

<div class="post-metadata">

**Author:** ![Krishna\_Gangaraju](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/krishna_gangaraju/32/69995_2.png) [@Krishna\_Gangaraju](https://community.sonarsource.com/u/Krishna_Gangaraju)\
**Post date:** [June 11, 2025, 10:41am UTC](https://community.sonarsource.com/t/java-11-code-scanning-with-sonarcloud/142610/2 "2025-06-11T10:41:49Z")

</div>

java version

```auto
openjdk version "11.0.22" 2024-01-16 LTS
OpenJDK Runtime Environment Corretto-11.0.22.7.1 (build 11.0.22+7-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.22.7.1 (build 11.0.22+7-LTS, mixed mode)

```

gradle version

```auto
------------------------------------------------------------
Gradle 7.6.1
------------------------------------------------------------
Build time: 2023-02-24 13:54:42 UTC
Revision: 3905fe8ac072bbd925c70ddbddddf4463341f4b4
Kotlin: 1.7.10
Groovy: 3.0.13
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 11.0.22 (Amazon.com Inc. 11.0.22+7-LTS)
OS: Linux 6.1.72-96.166.amzn2023.x86_64 amd64

```

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [June 12, 2025, 3:27pm UTC](https://community.sonarsource.com/t/java-11-code-scanning-with-sonarcloud/142610/3 "2025-06-12T15:27:35Z")

</div>

Hi,

This guide should help:

> [@Understanding \`java.lang.UnsupportedClassVersionError\`](https://community.sonarsource.com/t/understanding-java-lang-unsupportedclassversionerror/101562):
>
> Error during SonarQube Scanner execution 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 This error is Java’s painfully obscure way of saying The version of Java you’re trying to use is too old to run this program. To get your current version of Java, go to a command line and run …

&nbsp;  
Ann
