Sonarqube (sonarqube-9.9.0.65466) not starting in EC2 instance

Hello,

I got the sonarqube (sonarqube-9.9.0.65466) installed on EC2 linux machine with Java 19, however I am not able to get it started as i am seeing the below error. Could anyone help with this please?

“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”

Details:
Sonarqube - sonarqube-9.9.0.65466
Java - openjdk 19 2022-09-20
echo $JAVA_HOME - /usr/local/jdk-19
echo $PATH - /usr/local/jdk-19/bin:/usr/local/jdk-19/bin:/home/ec2-user/.nvm/versions/node/v18.15.0/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin

Java Details:
java --version
openjdk 19 2022-09-20
OpenJDK Runtime Environment (build 19+36-2238)

Hi,

Welcome to the community!

This is Java’s unhelpful and painfully obscure way of saying that the runtime version doesn’t match up to the compile version. In this case is that you’re trying to run SonarQube on Java 19, but only Java 17 is supported.

 
HTH,
Ann