Sonar scanner 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,
- Is sonarqube dator support applications running Java 17?
- 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
•
General requirements for your scanner environment
The table below describes what is required to run the scanner that performs analysis.
| Category | Description |
|---|---|
| Supported operating system |
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:
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