java.lang.UnsupportedClassVersionError

Hi Tobias,

I have Java 8, Java SE Development Kit 11, and Java SE Development Kit 16 installed on my computer.

Java installed

When I go to C:…\sonarqube\bin\windows-x86-64 and run StartSonar, it give me the following message before terminating. I can’t get it to run. What can be the issue? Do I need to configure something somewhere?

wrapper | → Wrapper Started as Console
wrapper | Launching a JVM…
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | WrapperSimpleApp: Unable to locate the 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 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
jvm 1 |
jvm 1 | WrapperSimpleApp Usage:
jvm 1 | java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments]
jvm 1 |
jvm 1 | Where:
jvm 1 | app_class: The fully qualified class name of the application to run.
jvm 1 | app_arguments: The arguments that would normally be passed to the
jvm 1 | application.
wrapper | ← Wrapper Stopped
Press any key to continue . . .

===============================================================
Update 13 August 2021: issue fixed.

I went to \sonarqube\conf\wrapper and edited Line 4:

# Path to JVM executable. By default it must be available in PATH.
# Can be an absolute path, for example:
#wrapper.java.command=/path/to/my/jdk/bin/java
wrapper.java.command=C:\Program Files\Java\jdk-11.0.12\bin\java

1 Like