Analysis doesn't support Java 14 runtime

For my open-source project I use SonarCloud as a Sonar analysis runner. When I switched JDK to version 14, I started getting these errors: Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 58

My project produces bytecode for Java 1.8 (class files version 52.0), so my assumption is that Sonar has some errors in processing JDK classes.

Some builds where Sonar analysis failed:

At the meantime, JDK 11 works fine: https://travis-ci.com/github/remal/tracing-spec/builds/175882910

Sources can be found here: https://github.com/remal/tracing-spec

Latest commit with failed analysis: https://github.com/remal/tracing-spec/tree/9f53dd680e7d50dccb73fbfb67b57729d8e38bc6

Hello,

Do you try to run your code scan with a JDK 14 as a runtime env for the Scanner or do you try to scan Java code using Java 14 syntaxes?

I’m asking because for sure, SonarCloud can’t scan Java 14 code for the moment and this will come normally the week of the 20th of July (once https://jira.sonarsource.com/browse/MMF-2083 is implemented).

Alex

Hello,

I’m building Java 8 sources and getting Java 8 class files using JDK 14.

When I was using JDK 1.8 and 11, Sonar was working fine. But I started getting this error when switched to JDK 14. No other settings were changed except JDK version.