Does SonarQube support Java9?

The question is actually twofold:

  • Can Java9 projects be analyzed using SonarQube?
  • Can SonarQube run JVM on Java9?

Same question for Java8

+7
java java-9 sonarqube
source share
1 answer

TL; DR: YES !!! It supports the analysis, apparently starting July 3, 2017. (But they are desperate to hide the fact ...)

At the moment (2017-10-24, SonarQube version 6.6), SonarQube can parse Java9 code using SonarJava 4.11 or newer , but runs on Java9 JVM is not officially supported .

Java Plugin Compatibility for SonarQube

Despite the SonarJava page , specifying support for Java8 only:

Supported Versions, Framework, and Special Analysis

  • Java language versions through 8

SonarJava 4.11 release news says otherwise:

SonarSource Team is pleased to announce the release of SonarJava 4.11.

This version provides support for Java 9 projects . But what does that mean?

This means that you can parse the source files module-info.java represented by the mosaic project.

In addition, support is explicitly displayed on the same page:

  • Try-with-resources enhancements
  • Private interface methods
  • Diamond operator extension
  • JaCoCo Reports for Java9 Classes

SonarQube Platform Compatibility

link

Supported Platforms

The SonarQube Java Analyzer is capable of analyzing any Java source files regardless of the version of Java to which they correspond. But SonarQube analysis and the SonarQube server require specific versions of the JVM.

Support:

  • Oracle JRE 7 โŒ
  • Oracle JRE 8 โœ“
  • Oracle JRE 9 โŒ
  • OpenJDK 7 โŒ
  • OpenJDK 8 โœ“
  • OpenJDK 9 โŒ
  • IBM JRE โŒ
  • Gcj โŒ
  • Oracle JRockit โŒ

References:

+11
source share

All Articles