Could not create the Java Virtual Machine

I am trying to use SonarQube v9.1.0.47736, Community edition, for my first experience with SonarQube. I have just now downloaded it, and am following instructions to start a local instance. I am running Java v10.0.2.

When I run the D:\SonarQube\bin\windows-x86-64\StartSonar.bat file, I get an error launching a JVM. The exact output of StartSonar.bat is:

wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Unrecognized option: --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED
jvm 1    | Error: Could not create the Java Virtual Machine.
jvm 1    | Error: A fatal exception has occurred. Program will exit.
wrapper  | JVM exited while loading the application.
wrapper  | JVM Restarts disabled.  Shutting down.
wrapper  | <-- Wrapper Stopped

I first had an error starting SonarCube that complained that my version of Java could not instantiate a certain type of class (something like that) so I installed the latest available version of Java, and now I get this error.

Any clue as to what is wrong and how I can diagnose further or remedy the problem will be greatly appreciated

Welcome :slight_smile:

Sonarqube server requires Java 11, see

The SonarQube scanners and the SonarQube server require Java version 11. Versions beyond Java 11 are not officially supported.

Gilbert

Thanks, Gilbert, that worked like a charm