SonarCloud supports Java 21 code scanning!

Hello Java Developers,

Thanks for your patience, I know some of you expected it to come earlier but that was not as easy as planned.
Anyway, it’s there, SonarCloud supports Java 21 code scanning!

As usual, nothing special to do to start scanning your Java 21 code, just run your favourite SonarScanner and that should be it.

Enjoy!
Alex

3 Likes

Thanks for all the hard work by you and the team!

Question: when will you guys update the binaries on the SonarQube download page to 10.5? Currently the version offered there is 10.4.

Support of Java 21 is only available for the moment for SonarCloud users.
For SonarQube 10.5, you will have to wait for its release … beginning of April :innocent:

Why is there more waiting time for the enterprise version? Is it because for marketing reasons to push more users to the cloud solution because it receives faster updates?

I don’t want to sound sour here but the java 21 release is already very late in my opinion so pushing it even further in the future when it is ready, is not very customer friendly.

SonarQube follows a fixed 2-month release cycle. We wanted to bring the support of Java 21 for 10.4 and for a lot of reasons, we missed the timeframe.

Hi Alexandre, it’s 2 months later now. When and in what release can we expect this for SonarQube?

1 Like

So JAVA 22 is also out and we are still waiting for Java 21 … I would really appreciate it if you can provide a proper date when we can expect this support on SonarQube :slight_smile: .

Thanks for your patience.

It’s finally here with the release of SonarQube 10.5: SonarQube 10.5: the latest version from Sonar

Support of future versions of Java should come faster now that we have tackled some technical challenges preventing us from being as fast as we expected.

5 Likes

Hello Alex ,

Does Sonarqube 10.2 will support Jave 21 or not ? Thanks in advance

Bala

Hi @Balaganesh_Murugan,

Java 21 is supported starting from SonarQube 10.5, you’ll need to update!

I suggest SonarQube 10.6 which is the latest :slight_smile:

Hope this helps,

1 Like

Is Sonar Qube Community version available for Java 21, I tried 10.4 version which didn’t work

Hey @Shantanu_Kumar

Please check the post above yours. :slight_smile: Support was introduced in 10.5.

I am getting this exception for Java 21 and SonarQube 10.7

Exception in thread “main” java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
at java.base/java.lang.System.setSecurityManager(System.java:430)
at org.sonar.process.PluginSecurityManager.restrictPlugins(PluginSecurityManager.java:42)
at org.sonar.server.app.WebSecurityManager.apply(WebSecurityManager.java:47)
at org.sonar.server.app.WebServer.main(WebServer.java:101)

Which is discusses here, Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecat - #7 by Mohamed_Yahya and it says to downgrade to java 17

You’ve posted in the topic about whether or not SonarQube supports Java 21 for code scanning. The message you’re receiving is when you use Java 21 as the runtime for starting the SonarQube server. You should still use Java 17 for that.

Got it