When I try to start the sonarqube version with JDK 21 getting error as below, and when the same is tried with JDK 17 its working fine.
2024.05.08 15:19:58 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\Documents\Softwares\sonarqube-10.5.1.90531\temp
2024.05.08 15:19:58 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:49891]
2024.05.08 15:19:58 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\Users\Documents\Softwares\sonarqube-10.5.1.90531\elasticsearch]: C:\Users\Documents\Softwares\jdk-21.0.3\bin\java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=C:\Users\Documents\Softwares\sonarqube-10.5.1.90531\elasticsearch -Des.path.conf=C:\Users\Documents\Softwares\sonarqube-10.5.1.90531\temp\conf\es -Des.distribution.type=tar -cp C:\Users\Documents\Softwares\sonarqube-10.5.1.90531\elasticsearch\lib\*;C:\Users\Documents\Softwares\sonarqube-10.5.1.90531\elasticsearch\lib\cli-launcher\* org.elasticsearch.launcher.CliToolLauncher
2024.05.08 15:19:58 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
May 08, 2024 3:20:06 PM sun.util.locale.provider.LocaleProviderAdapter <clinit>
WARNING: COMPAT locale provider will be removed in a future release
2024.05.08 15:20:24 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2024.05.08 15:20:24 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [C:\Users\Documents\Softwares\sonarqube-10.5.1.90531]: C:\Users\Documents\Softwares\jdk-21.0.3\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\Users\Documents\Softwares\sonarqube-10.5.1.90531\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-10.5.1.90531.jar;C:\Users\Documents\Softwares\sonarqube-10.5.1.90531\lib\jdbc\h2\h2-2.2.224.jar org.sonar.server.app.WebServer C:\Users\Documents\Softwares\sonarqube-10.5.1.90531\temp\sq-process5960965584461263725properties
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)
2024.05.08 15:20:25 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [Web Server]: 1
2024.05.08 15:20:25 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2024.05.08 15:20:25 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.05.08 15:20:25 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped