# SonarCloud scanner environment soon to require Java 11+

**URL:** <https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374>\
**Category:** Announcements\
**Tags:** sonarqube-cloud\
**Created:** [May 28, 2020, 7:28am UTC](https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374 "2020-05-28T07:28:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Bednorz](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/martin_bednorz/32/11703_2.png) [@Martin\_Bednorz](https://community.sonarsource.com/u/Martin_Bednorz)\
**Post date:** [May 28, 2020, 7:28am UTC](https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374/1 "2020-05-28T07:28:59Z")

</div>

Hello SonarCloud :sonarcloud: community,

The scanner environment is going to require Java 11+ starting from October 2020. The Eclipse Project is [moving to Java 11](https://www.eclipse.org/lists/cross-project-issues-dev/msg17532.html) in September 2020 and we are relying on ECJ (the Eclipse compiler) for our analyzers. Staying close to the latest ECJ is crucial for analysis stability and for support of all the latest language features, especially since many languages increased their pace of new releases. See [MMF-2035](https://jira.sonarsource.com/browse/MMF-2035) for more details.

All users of the [Automatic Analysis](https://sonarcloud.io/documentation/analysis/automatic-analysis/) feature are already set and don’t have to take any action. For all other setups there is going to be a warning in the SonarCloud UI and the PR summary (inside the ALM’s) if the environment does not meet the necessary version requirement.

- SonarCloud UI  
 ![mff-2035-scui](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/7/7d62bb591a7a7ddf41222e122e56f9ac4e20273d.png)
- GitHub Pull Request Decoration  
 ![Annotation 2020-05-27 154140](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/3/398086926e78fa1650f541e46454dc75d66e15b5.png)

In addition, we updated all applicable sample projects to use Java 11 by default. Please take a look if you are unsure on how to upgrade:

- GitHub [Actions](https://github.com/SonarSource/sonarcloud-github-action-samples) and [Travis](https://github.com/SonarSource/sonarcloud_examples)
- [BitBucket](https://bitbucket.org/sonarsource/)
- [Azure DevOps](https://sonarsource.visualstudio.com/DotNetTeam%20Project/_git/sample-dotnet-core-project)

The SonarCloud :sonarcloud: Team.

**Update 2020-12-09:** We moved the end of support date until 1st of February 2021. Additionally, there will be a brownout from 11 January 2021 to 15 January 2021 during which the first analysis run with a scanner using Java versions less than 11 will fail. You can find more information on our [documentation](https://sonarcloud.io/documentation/appendices/end-of-support/).

---

<div class="post-metadata">

**Author:** ![DamienDennehy](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@DamienDennehy](https://community.sonarsource.com/u/DamienDennehy)\
**Post date:** [May 28, 2020, 9:14am UTC](https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374/2 "2020-05-28T09:14:20Z")

</div>

Do you have any suggestions about where it’s not possible to update?  
For example Visual Studio and Xamarin requires OpenJdk 1.8 (Java 8) and will not build on anything above it.

> [@Issue upgrading from Java 1.8.0-25 because of Xamarin and OpenJdk](https://community.sonarsource.com/t/issue-upgrading-from-java-1-8-0-25-because-of-xamarin-and-openjdk/25330):
>
> Recently a warning appears in our build logs and Pull Requests on GitHub using SonarCloud/Scanner: WARN: The version of Java (1.8.0-25) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. We have successfully updated our build server to a new version of Java for most of our projects with no problems at all. However we have a Xamarin.Android project. Xamarin.Android seems to require a specific versi…

---

<div class="post-metadata">

**Author:** ![csjohnson3](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@csjohnson3](https://community.sonarsource.com/u/csjohnson3)\
**Post date:** [May 29, 2020, 5:01am UTC](https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374/3 "2020-05-29T05:01:06Z")

</div>

Same at my company, but it’s a 100 plus code bases with 1.8. I’m intending to test moving analysis out of the build jdk and run it in a container. We already use a container in ci for the sonar scanner for non Java projects… I just hope there are no incompatibility issues between files generated/instrumented by jdk 8 and the scanner running in 11.

---

<div class="post-metadata">

**Author:** ![Bruno\_Wouters](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/bruno_wouters/32/1085_2.png) [@Bruno\_Wouters](https://community.sonarsource.com/u/Bruno_Wouters)\
**Post date:** [June 16, 2020, 12:59pm UTC](https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374/4 "2020-06-16T12:59:41Z")

</div>

What should I install on our self hosted Windows DevOps agents since the JRE does not exist anymore? We do not develop applications in Java and probably only need it to run the SonarCloud code analysis. Should we install the OpenJDK [http://jdk.java.net/](http://jdk.java.net/) or the Oracle JDK [https://www.oracle.com/java/technologies/javase-downloads.html](https://www.oracle.com/java/technologies/javase-downloads.html)? I assume the only free option is the OpenJDK?

---

<div class="post-metadata">

**Author:** ![Bruno\_Wouters](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/bruno_wouters/32/1085_2.png) [@Bruno\_Wouters](https://community.sonarsource.com/u/Bruno_Wouters)\
**Post date:** [June 18, 2020, 10:13am UTC](https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374/5 "2020-06-18T10:13:35Z")

</div>

I installed the OpenJDK which seems to work fine.

---

<div class="post-metadata">

**Author:** ![lorriehall](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/lorriehall/32/28948_2.png) [@lorriehall](https://community.sonarsource.com/u/lorriehall)\
**Post date:** [September 6, 2020, 8:06am UTC](https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374/6 "2020-09-06T08:06:13Z")

</div>

Can I clarify what will happen post-October - will any projects using Java8 simply not analyse or will it attempt to analyse and fail?

---

<div class="post-metadata">

**Author:** ![alban.auzeill](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alban.auzeill/32/36_2.png) [@alban.auzeill](https://community.sonarsource.com/u/alban.auzeill)\
**Post date:** [September 8, 2020, 8:54am UTC](https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374/8 "2020-09-08T08:54:32Z")

</div>

Hi @lorriehall, Post-October clarification for Java 8 projects:  
Projects containing Java 8 source code will be able to keep the same build configuration using a JDK8 to produce their binaries (Note: it’s also possible to build a Java 8 project using JDK11). But at the analysis step (`sonar-scanner` or `mvn sonar:sonar` or `gradle sonarqube`…) a JVM version 11 or greater will be required (Note: it’s possible to have a JDK/JVM version 8 and 11 on the same machine). Having this requirement fulfilled, projects containing Java 8 source code will continue to be analyzed as usual.

---

<div class="post-metadata">

**Author:** ![jseletz](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jseletz](https://community.sonarsource.com/u/jseletz)\
**Post date:** [September 11, 2020, 1:35pm UTC](https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374/9 "2020-09-11T13:35:28Z")

</div>

I think the question is (at least for me), will a gradle build using the sonar plugin and calling the sonar task that is running with jdk 8 fail, or simply skip the analysis (e.g. a WARN vs ERROR). For older release branches of code that we may have to patch before implementing JDK 11, I need to know if their builds must be updated to run w/jdk 11, or if they can be left as is (running w/jdk 8) and simply won’t perform sonar analysis but the gradle task won’t fail? Thanks.

---

<div class="post-metadata">

**Author:** ![jseletz](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jseletz](https://community.sonarsource.com/u/jseletz)\
**Post date:** [September 23, 2020, 5:43pm UTC](https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374/10 "2020-09-23T17:43:49Z")

</div>

@alban.auzeill can you please clarify my prior question? Thanks

---

<div class="post-metadata">

**Author:** ![Fred\_Puistaja](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/fred_puistaja/32/8550_2.png) [@Fred\_Puistaja](https://community.sonarsource.com/u/Fred_Puistaja)\
**Post date:** [November 26, 2020, 12:02pm UTC](https://community.sonarsource.com/t/sonarcloud-scanner-environment-soon-to-require-java-11/25374/11 "2020-11-26T12:02:53Z")

</div>

Our project uses Gradle + Java 8. At the moment it’s not possible to migrate over to Java 11.

SonarCloud needs Java 11.

Does anyone know how to setup Bitbucket pipelines where Java 8 is used for building our project and Java 11 is used for SonarCloud analysis?
