StartSonar.bat doesn't open

When I execute StartSonar.bat the CMD open and automatically closes and doesn’t shows nothing. I’m using java 18, 17 and 11.

It’s a bug, you can edit the files StartSonar.bat and lib/find_java.bat and replace the latest goto:eof with exit /b 0. (Also note that SonarQube server requires Java 11)

2 Likes

What solved my problem was to add the JAVA_HOME and the Java directory in Path, in system environment variables.

Check this video: Installing Java and Setting Up the Environment Variables | GeeksforGeeks - YouTube

It worked ! What knowledge helped you come to this solution ?

1 Like

Hello,

Setting JAVA_HOME alone will not resolve this. Adding the location the “bin” directory of the JDK install will to your PATH will. In this, my JDK is installed at C:\Program Files\Java\jdk-11.0.15.1

set PATH=%PATH%;C:\Program Files\Java\jdk-11.0.15.1\bin

The Oracle JDK 11 installer places another copy of java.exe in \Program Files\Common Files\Oracle\Java\javapath and adds to the PATH. Version 9.6/9.6.1 does not like this location and will quietly abort with no log output.

Brian