# Could not create the Java Virtual Machine

**URL:** <https://community.sonarsource.com/t/could-not-create-the-java-virtual-machine/50200>\
**Category:** SonarQube Server / Community Build\
**Tags:** java\
**Created:** [September 22, 2021, 4:57pm UTC](https://community.sonarsource.com/t/could-not-create-the-java-virtual-machine/50200 "2021-09-22T16:57:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Doktor9](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/doktor9/32/25896_2.png) [@Doktor9](https://community.sonarsource.com/u/Doktor9)\
**Post date:** [September 22, 2021, 4:57pm UTC](https://community.sonarsource.com/t/could-not-create-the-java-virtual-machine/50200/1 "2021-09-22T16:57:09Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![anon67236913](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@anon67236913](https://community.sonarsource.com/u/anon67236913)\
**Post date:** [September 22, 2021, 5:31pm UTC](https://community.sonarsource.com/t/could-not-create-the-java-virtual-machine/50200/2 "2021-09-22T17:31:51Z")

</div>

Welcome 🙂

Sonarqube server requires Java 11, see

> **[Prerequisites and overview](https://docs.sonarsource.com/sonarqube/latest/requirements/prerequisites-and-overview/)**
>
> The prerequisities for installing SonarQube.

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

Gilbert

---

<div class="post-metadata">

**Author:** ![Doktor9](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/doktor9/32/25896_2.png) [@Doktor9](https://community.sonarsource.com/u/Doktor9)\
**Post date:** [September 23, 2021, 6:01am UTC](https://community.sonarsource.com/t/could-not-create-the-java-virtual-machine/50200/3 "2021-09-23T06:01:52Z")

</div>

Thanks, Gilbert, that worked like a charm

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [September 30, 2021, 6:02am UTC](https://community.sonarsource.com/t/could-not-create-the-java-virtual-machine/50200/4 "2021-09-30T06:02:23Z")

</div>

Closed on September 30, 2021, 6:02am UTC

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