# How to analysis java 8 application(maven 3.6.3) with sonarqube 9.5

**URL:** <https://community.sonarsource.com/t/how-to-analysis-java-8-application-maven-3-6-3-with-sonarqube-9-5/68653>\
**Category:** SonarQube Server / Community Build\
**Created:** [July 24, 2022, 2:25pm UTC](https://community.sonarsource.com/t/how-to-analysis-java-8-application-maven-3-6-3-with-sonarqube-9-5/68653 "2022-07-24T14:25:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hakyumkim](https://avatars.discourse-cdn.com/v4/letter/h/47e85d/32.png) [@hakyumkim](https://community.sonarsource.com/u/hakyumkim)\
**Post date:** [July 24, 2022, 2:25pm UTC](https://community.sonarsource.com/t/how-to-analysis-java-8-application-maven-3-6-3-with-sonarqube-9-5/68653/1 "2022-07-24T14:25:21Z")

</div>

```auto
Must-share information (formatted with [Markdown](https://commonmark.org/help/)):
* which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube 9.5 community

* what are you trying to achieve
the application environment is Java 8 and Maven 3.6.3, I try to analysis application with this script
mvn clean verify sonar:sonar -Dsonar.projectKey=my-webapp -Dsonar.host.url=https://sonar.local.com -Dsonar.login= *****************

* what have you tried so far to achieve this
I read this https://docs.sonarqube.org/latest/analysis/languages/java/#header-3 but I don`t know how to set **sonar.java.jdkHome=/usr/lib/jvm/jdk1.8.0_211** previous script.

I try to execute the script like this

mvn clean verify sonar:sonar -Dsonar.projectKey=my-webapp -Dsonar.host.url=https://sonar.local.com -Dsonar.login= ***************** -Dsonar.java.jdkHome=/usr/lib/jvm/jdk1.8.0_211

log shows java is not compatible
|24-Jul-2022 22:56:30|[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project ssg-mdpo-webapp: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar failed: An API incompatibility was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar: 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|
|---|---|
|24-Jul-2022 22:56:30|[ERROR] -----------------------------------------------------|
|24-Jul-2022 22:56:30|[ERROR] realm = plugin>org.codehaus.mojo:sonar-maven-plugin:3.9.1.2184|
|24-Jul-2022 22:56:30|[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy|
|24-Jul-2022 22:56:30|[ERROR] urls[0] = file:/root/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.9.1.2184/sonar-maven-plugin-3.9.1.2184.jar|
|24-Jul-2022 22:56:30|[ERROR] urls[1] = file:/root/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar|
|24-Jul-2022 22:56:30|[ERROR] urls[2] = file:/root/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar|
|24-Jul-2022 22:56:30|[ERROR] urls[3] = file:/root/.m2/repository/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar|
|24-Jul-2022 22:56:30|[ERROR] urls[4] = file:/root/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.2.588/sonar-scanner-api-2.16.2.588.jar|
|24-Jul-2022 22:56:30|[ERROR] urls[5] = file:/root/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar|
|24-Jul-2022 22:56:30|[ERROR] Number of foreign imports: 1|
|24-Jul-2022 22:56:30|[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]|

```

How do i fix it?

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [July 25, 2022, 8:07am UTC](https://community.sonarsource.com/t/how-to-analysis-java-8-application-maven-3-6-3-with-sonarqube-9-5/68653/2 "2022-07-25T08:07:06Z")

</div>

Hey there.

Check the documentation on [Scanner Environment](https://docs.sonarqube.org/latest/analysis/scanner-environment/)

---

<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:** [August 4, 2022, 1:58am UTC](https://community.sonarsource.com/t/how-to-analysis-java-8-application-maven-3-6-3-with-sonarqube-9-5/68653/3 "2022-08-04T01:58:35Z")

</div>

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