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.
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
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.
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 .
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.
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)
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.