Fix SonarQube's 'jvm.dll is missing' and 'missing server JVM' startup error

If you’ve downloaded and installed SonarQube but you keep running into a message such as ‘jvm.dll is missing’ or ‘jvm.dll not found, and it’s triggering a ‘missing server JVM’ error, the likely problem is that the program is defaulting to a JRE installation rather than a JDK.

To solve the ‘missing server JVM’ error, first check that there is indeed a JDK installed on the local operating system. If not, you need to install one. If there is one installed, you need to make sure SonarCube is defaulting to the utilities in the JDK’s bin directory and not that of the JRE. One way to do this at the SonarQube level is to edit the wrapper.conf file. You’ll find it in the SonarQube installation’s \conf directory.

Fix the jvm.dll missing server JVM SonarQube error

SonarQube jvm.dll missing server JVM installation error

Solving the jvm.dll is missing problem

The first property in SonarQube’s wrapper.conf file is a pointer to the java.exe file, although the extension of the file is left out:

# Path to JVM executable. By default it must be available in PATH.
# Misconfiguration will cause jvm.dll is missing or not found errors
# Can be an absolute path
wrapper.java.command=java

Find the missing server JVM

My local machine has JDK 8 installed off the root of C:\ in a folder named _jdk1.8, which means my local path to the java.exe file is C:\_jdk1.8\bin\java. This is the updated value I provide for the location of the JVM executable file:

Edit wrapper.conf to fix jvm.dll is missing error

Edit the SonarQube wrapper.conf file to fix the jvm.dll not found error

Find the missing server JVM

My local machine has JDK 8 installed off the root of C:\ in a folder named _jdk1.8, which means my local path to the java.exe file is C:\_jdk1.8\bin\java. This is the updated value I provide for the location of the JVM executable file:

executable file:

# Path to JVM executable. By default it must be available in PATH.
# Misconfiguration may cause jvm.dll is missing or jvm.dll not found errors 
# Can be an absolute path
wrapper.java.command=C:\_jdk1.8\bin\java

With the JDK configured properly, subsequent calls to the StartSonar shell script or batch command should run to completion, without any complaints about how the ‘jvm.dll is missing’ or how the ‘jvm.dll not found’ or that there is a ‘missing server JVM.’ SonarQube should start up normally, and the only thing you’ll have to worry about is passing the various quality checks the static code analysis tool puts your programs through.