I'm trying to install SonarQube, but after downloading and unzipping it, when I try to run StartSonar.bat I get the following error:
Picked up _JAVA_OPTIONS: -Xmx512M
Starting SonarQube...
Picked up _JAVA_OPTIONS: -Xmx512M
Error: LinkageError occurred while loading main class org.sonar.application.App
java.lang.UnsupportedClassVersionError: org/sonar/application/App has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
I searched if anyone had the same problem, and I've found that it might be because of an incorrect java version. When I run java -version in the cmd I get:
Picked up _JAVA_OPTIONS: -Xmx512M
java version "11.0.15" 2022-04-19 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.15+8-LTS-149)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.15+8-LTS-149, mixed mode)
But when I click on "About Java" icon in the search bar, it tells me that my current java version is version 8 update 361
I've tried to update it but it tells me that I'm up to date. Also, I have the same path to Java both in my JAVA_HOME and PATH variables. Do you have any idea what else I could try?