Compatibility Issue: SonarQube 25.1.0.102112 Fails to Start on Java 21 Due to Security Manager Depre

Compatibility Issue: SonarQube 25.1.0.102112 Fails to Start on Java 21 Due to Security Manager Deprecation

Description:
I am encountering an issue while attempting to run SonarQube 25.1.0.102112 with Java 21. The startup process fails, displaying an error message related to the Security Manager, which is deprecated in Java 21.

Details:

  • SonarQube Version:25.1.0.102112
  • Java Version: 21
  • OS:[ windows 10 enterprise virtual desktop]
  • Error Message:
    Security Manager is deprecated and will be removed in a future release.
    
    Error:  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)
    

Impact:

The inability to use SonarQube 25.1.0.102112 with Java 21.

Attempted Solutions:

  • Added the JVM option -Djava.security.manager=allow in StartSonar.bat

Please provide guidance on how to resolve this issue.

Hey there.

You need to use Java 17 to start your SonarQube server. Java 21 is not supported.

Java 21 should be supported in Community Build 25.2, and the next release of SonarQube Server.

1 Like

Thank you Colin for the clarification. It’s helpful to know about java 21 support in the next release.