Cannot launch SonarQube because of java


I have just downloaded, dezipped, and run SonarQube Community Edition, and I got and installed the last JRE (1.8.0_391-b13) some hours ago

When I try to launch StartSonar.bat, I get the following error message :

Starting SonarQube…
Unrecognized option: --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


Sonarqube 10.x needs to run with Java 17
get it here
see Prerequisites and overview


Thank you. I just read the top of the page, wich mentionned JRE. And I’ve got the last release…
Then, the documentation talks about hardware, so I thought the software requirements were over ! :slight_smile:

But I don’t understand why the requirements mentiosn JRE 17. It seems the last release is 8 :slight_smile:
So I installed JDK 21.

I have also installed PostgreSQL.

But when I launch StartSonar.bat, I get an other error :

2023.10.20 16:50:04 INFO  app[] Elasticsearch listening on [HTTP:, TCP:]
2023.10.20 16:50:04 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\Users\sva\OneDrive - EDAP TMS\Bureau\sonarqube-\elasticsearch]: C:\Program Files\Java\jdk-21\bin\java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=C:\Users\sva\OneDrive - EDAP TMS\Bureau\sonarqube-\elasticsearch -Des.path.conf=C:\Users\sva\OneDrive - EDAP TMS\Bureau\sonarqube-\temp\conf\es -Des.distribution.type=tar -cp C:\Users\sva\OneDrive - EDAP TMS\Bureau\sonarqube-\elasticsearch\lib\*;C:\Users\sva\OneDrive - EDAP TMS\Bureau\sonarqube-\elasticsearch\lib\cli-launcher\* org.elasticsearch.launcher.CliToolLauncher
2023.10.20 16:50:04 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
oct. 20, 2023 4:50:07 PM sun.util.locale.provider.LocaleProviderAdapter <clinit>
WARNING: COMPAT locale provider will be removed in a future release
2023.10.20 16:50:12 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2023.10.20 16:50:12 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [C:\Users\sva\OneDrive - EDAP TMS\Bureau\sonarqube-]: C:\Program Files\Java\jdk-21\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8\Users\sva\OneDrive - EDAP TMS\Bureau\sonarqube-\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/ --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/ -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-;C:\Users\sva\OneDrive - EDAP TMS\Bureau\sonarqube-\lib\jdbc\h2\h2-2.1.214.jar C:\Users\sva\OneDrive - EDAP TMS\Bureau\sonarqube-\temp\sq-process2082492275868402949properties
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(
        at org.sonar.process.PluginSecurityManager.restrictPlugins(
2023.10.20 16:50:12 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [Web Server]: 1
2023.10.20 16:50:12 INFO  app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.10.20 16:50:12 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.10.20 16:50:12 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

Don’t know why recommends Java 8, when Java 21 is the new LTS version, and Java 17 the former !?

Most Enterprise versions do not support Java 21 LTS yet, as it is still relatively new (September 19 2023)
Sonarqube also is not Java 21 ready yet.

Sonarqube 10.2.1 needs to run on Java 17, not Java 8 nor Java 21.
As most users switched from Oracle JDK to some OpenJDK distribution, i posted the link
to the Eclipse Temurin distribution by Adoptium as example.

OK, I installed OpenJDK JRE 17, and I can now launch StartSonar.bat.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.