Sonarqube integration and startSonar.bat failed Error(0x2)

Seems that your update of wrapper.conf is wrong, its first lines after correct edit should look like:

# Path to JVM executable. By default it must be available in PATH.
# Can be an absolute path, for example:
wrapper.java.command=C:\Program Files\Java\jdk1.8.0_77\bin\java
#wrapper.java.command=java

The command java is not in the PATH. Another option if you don't want to edit the PATH variable is to define the absolute path to "java" in conf/wrapper.conf (see property wrapper.java.command).


I have updated JDK path in wrapper.conf file and it worked. Now, Wrapper.conf file looks like below:

# Path to JVM executable. By default it must be available in PATH.
# Can be an absolute path, for example:
wrapper.java.command=C:\Program Files\Java\jdk-11.0.7\bin\java
#wrapper.java.command=java