# SonarQube Analysis Failing on Jenkins Pipeline Due to Java 8 Incompatibility – Need Help with Dynamic Java Version Switching

**URL:** <https://community.jenkins.io/t/sonarqube-analysis-failing-on-jenkins-pipeline-due-to-java-8-incompatibility-need-help-with-dynamic-java-version-switching/20093>\
**Category:** Ask a question\
**Created:** [September 25, 2024, 5:18am UTC](https://community.jenkins.io/t/sonarqube-analysis-failing-on-jenkins-pipeline-due-to-java-8-incompatibility-need-help-with-dynamic-java-version-switching/20093 "2024-09-25T05:18:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![sodul](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/sodul/32/7828_2.png) [@sodul](https://community.jenkins.io/u/sodul)\
**Post date:** [September 25, 2024, 6:52pm UTC](https://community.jenkins.io/t/sonarqube-analysis-failing-on-jenkins-pipeline-due-to-java-8-incompatibility-need-help-with-dynamic-java-version-switching/20093/3 "2024-09-25T18:52:17Z")

</div>

See this related post, it might help with your use case.

> [@Unable to connect to SonarCloud](https://community.jenkins.io/t/unable-to-connect-to-sonarcloud/19902/2):
>
> We gave up in the Sonar plugin as it was not working as intended, including crashing the pipelines IIRC. Instead we just embed Sonar Scanner into our CI container and call it as a regular process. This has worked well for us for the past 5 years. The ‘downside’ is that we need to pass the sonar token explicitly to the step, but we are going to address that by writing a custom step that will get the creds and call the scanner in one line. Note that for SonarCloud the Scanner does require JRE 17…

---

_[View the full topic](https://community.jenkins.io/t/sonarqube-analysis-failing-on-jenkins-pipeline-due-to-java-8-incompatibility-need-help-with-dynamic-java-version-switching/20093)._
