I could resolve this with the following instructions:
1- Uninstall the current installed Java version.
2- I was using Windows 10, so I downloaded and installed this JAVA version https://download.oracle.com/java/17/archive/jdk-17_windows-x64_bin.msi
3- Modified this file \sonarqube-10.6.0.92116\bin\windows-x86-64\StartSonar.bat with the following command:
echo Starting SonarQube…
“F:\Program Files\Java\jdk-17\bin\java” -Xms8m -Xmx32m^
-Djava.awt.headless=true^
–add-exports=java.base/jdk.internal.ref=ALL-UNNAMED^
–add-opens=java.base/java.lang=ALL-UNNAMED^
–add-opens=java.base/java.nio=ALL-UNNAMED^
–add-opens=java.base/sun.nio.ch=ALL-UNNAMED^
–add-opens=java.management/sun.management=ALL-UNNAMED^
–add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED^
-cp “%REALPATH%…..\lib\sonar-application-10.6.0.92116.jar” “org.sonar.application.App”
4- Then, as administrator, I opened the cmd, and type startsonar.bat
5- then HTTP://localhost:9000 showed me SonarQube working as expected.