# SonarCloud supports Java 21 code scanning!

**URL:** <https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681>\
**Category:** Announcements\
**Tags:** java21, java\
**Created:** [February 22, 2024, 1:21pm UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681 "2024-02-22T13:21:05Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Gigleux](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alexandre_gigleux/32/26_2.png) [@Alexandre\_Gigleux](https://community.sonarsource.com/u/Alexandre_Gigleux)\
**Post date:** [February 22, 2024, 1:21pm UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/1 "2024-02-22T13:21:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anon81664306](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anon81664306](https://community.sonarsource.com/u/anon81664306)\
**Post date:** [February 23, 2024, 11:41am UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/2 "2024-02-23T11:41:29Z")

</div>

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

Question: when will you guys update the binaries on the [SonarQube download page](https://www.sonarsource.com/products/sonarqube/downloads/) to 10.5? Currently the version offered there is 10.4.

---

<div class="post-metadata">

**Author:** ![Alexandre\_Gigleux](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alexandre_gigleux/32/26_2.png) [@Alexandre\_Gigleux](https://community.sonarsource.com/u/Alexandre_Gigleux)\
**Post date:** [February 23, 2024, 1:56pm UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/3 "2024-02-23T13:56:24Z")

</div>

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 😇

---

<div class="post-metadata">

**Author:** ![anon81664306](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anon81664306](https://community.sonarsource.com/u/anon81664306)\
**Post date:** [February 23, 2024, 2:27pm UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/4 "2024-02-23T14:27:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alexandre\_Gigleux](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alexandre_gigleux/32/26_2.png) [@Alexandre\_Gigleux](https://community.sonarsource.com/u/Alexandre_Gigleux)\
**Post date:** [February 23, 2024, 3:00pm UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/5 "2024-02-23T15:00:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mark\_van\_Osch](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mark_van_osch/32/53035_2.png) [@Mark\_van\_Osch](https://community.sonarsource.com/u/Mark_van_Osch)\
**Post date:** [April 15, 2024, 3:48pm UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/7 "2024-04-15T15:48:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cmandesign](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/cmandesign/32/56688_2.png) [@cmandesign](https://community.sonarsource.com/u/cmandesign)\
**Post date:** [April 16, 2024, 12:06pm UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/8 "2024-04-16T12:06:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alexandre\_Gigleux](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alexandre_gigleux/32/26_2.png) [@Alexandre\_Gigleux](https://community.sonarsource.com/u/Alexandre_Gigleux)\
**Post date:** [April 17, 2024, 6:59am UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/9 "2024-04-17T06:59:40Z")

</div>

Thanks for your patience.

It’s finally here with the release of SonarQube 10.5: [SonarQube 10.5: the latest version from Sonar](https://www.sonarsource.com/products/sonarqube/whats-new/sonarqube-10-5/)

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.

---

<div class="post-metadata">

**Author:** ![Balaganesh\_Murugan](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/balaganesh_murugan/32/60455_2.png) [@Balaganesh\_Murugan](https://community.sonarsource.com/u/Balaganesh_Murugan)\
**Post date:** [August 20, 2024, 9:02am UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/10 "2024-08-20T09:02:50Z")

</div>

Hello Alex ,

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

Bala

---

<div class="post-metadata">

**Author:** ![gab](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/gab/32/72206_2.png) [@gab](https://community.sonarsource.com/u/gab)\
**Post date:** [September 2, 2024, 1:01pm UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/11 "2024-09-02T13:01:11Z")

</div>

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 🙂

Hope this helps,

---

<div class="post-metadata">

**Author:** ![Shantanu\_Kumar](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/shantanu_kumar/32/55696_2.png) [@Shantanu\_Kumar](https://community.sonarsource.com/u/Shantanu_Kumar)\
**Post date:** [November 27, 2024, 11:36am UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/12 "2024-11-27T11:36:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [November 27, 2024, 5:12pm UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/13 "2024-11-27T17:12:44Z")

</div>

Hey @Shantanu_Kumar

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

---

<div class="post-metadata">

**Author:** ![Shantanu\_Kumar](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/shantanu_kumar/32/55696_2.png) [@Shantanu\_Kumar](https://community.sonarsource.com/u/Shantanu_Kumar)\
**Post date:** [November 28, 2024, 5:21am UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/14 "2024-11-28T05:21:40Z")

</div>

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](https://community.sonarsource.com/t/exception-in-thread-main-java-lang-unsupportedoperationexception-the-security-manager-is-deprecat/78162/7) and it says to downgrade to java 17

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [November 28, 2024, 7:11am UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/15 "2024-11-28T07:11:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Shantanu\_Kumar](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/shantanu_kumar/32/55696_2.png) [@Shantanu\_Kumar](https://community.sonarsource.com/u/Shantanu_Kumar)\
**Post date:** [November 28, 2024, 2:26pm UTC](https://community.sonarsource.com/t/sonarcloud-supports-java-21-code-scanning/109681/16 "2024-11-28T14:26:57Z")

</div>

Got it
