Sonar scanner java 17

  • sonar scanner java 17
  • Sonarqube scanner java 17
  • Sonar scanner cli java 17
  • Scanner environment

    A Java runtime environment is always required to run the scanner that performs (CI-based) analysis. This applies to all scanner variants (CLI, CI-specific, etc.)

    js runtime.

    The required versions for these runtimes change with successive versions of the scanner. The current requirements and recommendations are:

    • Java 17 is the minimum recommended version.
    • 20 is the recommended version, the active LTS. 

    Scanner vs project

    The requirements above refer only to the versions of Java and  used by the scanner itself to run.

    Java configuration

    GitHub Actions

    The SonarQube GitHub Action can be configured for different target build technologies (.NET, Gradle, Maven, etc).

    Maven / Gradle

    If your whole Maven or Gradle build doesn't run on Java 17, we suggest first to try to base the whole build on one of those two versions of Java. If it's not compatible, then you can override the environment variable just before the analysis step, as shown here:

    Azure DevOps

    All VM images available in Azure Pipelines for Microsoft-hosted agents already contain Java There is no further action required. For self-hosted agents, you must ensure that you

    SonarQube dator support Java 17

    Peapodsec (PeapodSecurity) 1

    Hello,

    What version are we using? SonarQube enterprise Version ; Scanner - java (adopt openjdk)

    We’ve upgraded sonarqube scanner version to Java17(adopt openjdk) and most of our applications are running on Java 8,11,12,

    1. Is sonarqube dator support applications running Java 17?
    2. Since we’ve upgraded the scanner to 17, will it support of apps running on Java 8,11,12,17?

    Please let me know

    Thanks.

    ganncamp (G Ann Campbell) 2

    Hi,

    Welcome to the community!

    SonarQube does not support Java neither for running the server / scanner nor for analysis of Java 17 code in projects.

    In SonarQube , Java 17 is supported for running analysis, and parsing of Java 18 code (and 17, too) is also supported.

    Regarding the version of Java your code runs with, as long as you analyze with a supported utgåva of Java, you can compile with or to whatever utgåva of Java you like.


    HTH,
    Ann

    Peapodsec (PeapodSecurity) 3

    Thanks Ann, fryst vatten Java 17 on sonarscanner supports projects using Java 9 and under?

    ganncamp (G Ann Campbell) 4

    Hi,

    You can analyze Java if you like as long as you use a supported JVM to r

  • sonar scanner java 17
  • General requirements for your scanner environment

    The table below describes what is required to run the scanner that performs analysis.

    CategoryDescription
    Supported operating system
    • Linux (x64, AArch64).
    • Windows (x64).
    • macOS (x64, AArch64).

    Note that z/OS is not supported.

    Java runtime environment

    Depending on your SonarScanner, JRE may be auto-provisioned. JRE auto-provisioning is currently supported by:

    • SonarScanner CLI, from version
    • SonarScanner for .NET, from version
    • SonarScanner for NPM, from version
    • SonarScanner for Maven, from version
    • SonarScanner for Gradle, from version

    If your SonarScanner doesn't support JRE auto-provisioning, the following Java runtime environment is required: 

    See If JRE auto-provisioning is not supported below for the actions you may need to take to meet these requirements.

    Additional requirements may exist for specific scanners or languages. Check the respective SonarScanner and language pages in this high-level section for possible additional requirements. .

    • The requirement on the Java runtime environment refers only to the version of Java used by the scanner itself to run. It does not rest