Jdk-17.0.2\bin"' is not recognized as an internal or external command

Hello @Colin ,
Thank you for your support…
I am getting below error while running startsonar.bat command.

Please find my env variables below.

image


image

I had set above three env variable paths.second path is for scanner.

Please confirm,where i am wrong.
Also when i am deleting SONAR_JAVA_PATH,then i am getting error that sonar_java_path is not configured.
Thanks.

the variable SONAR_JAVA_PATH is supposed to have the full path to the executable…

in your case probably: D:\openjdk-17.0.2_windoze-x64_bin\jdk-17.0.2\bin\java.exe

(sorry for any typos :wink: )

Hey @avl …After updating SONAR_JAVA_PATH as per your suggestion, I got below result.


-still java -version command not working.

.Now when i am trying to start SonarQube server, then its starting but stopping immediately.

Please confirm to proceed.

Thanks for your support…!

Setting the variable does not change anything for the shell. This is normal. To make the “java.exe” work in the shell, you would need to add the folder containing java.exe to your PATH, as well, not just sonarqube’s bin directory. – but that doesn’t matter. Sonarqube now finds java.exe just fine,

The new problem is, that your machine seems to be too low on RAM to run the sonarqube server process.

Do you have any other machine available with more RAM, or maybe it helps if you close some other programs (e.g. webbrowser, eclipse, …) before starting sonarqube.

@avl …I Got it…but may i know why java -version is not showing anything?

you would need to add the folder containing java.exe to your PATH

your PATH would need to look like:

set PATH=D:\openjdk-17.0.2_windoze-x64_bin\jdk-17.0.2\bin;D:\Users\... 

(again, sorry for typos…, and add the rest of the old path to where I put the “…”)