SonarCloud scanner environment soon to require Java 11+

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 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 for more details.

All users of the 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.

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:

The SonarCloud :sonarcloud: Team.

9 Likes

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.

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.

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/ or the Oracle JDK https://www.oracle.com/java/technologies/javase-downloads.html? I assume the only free option is the OpenJDK?

I installed the OpenJDK which seems to work fine.

1 Like