# Can I not use Sonar.java.binaries parameters?

**URL:** <https://community.sonarsource.com/t/can-i-not-use-sonar-java-binaries-parameters/45710>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube, scanner, java\
**Created:** [June 30, 2021, 10:37am UTC](https://community.sonarsource.com/t/can-i-not-use-sonar-java-binaries-parameters/45710 "2021-06-30T10:37:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![smbands](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/smbands/32/23564_2.png) [@smbands](https://community.sonarsource.com/u/smbands)\
**Post date:** [June 30, 2021, 10:37am UTC](https://community.sonarsource.com/t/can-i-not-use-sonar-java-binaries-parameters/45710/1 "2021-06-30T10:37:58Z")

</div>

sonarqube ：6.7.7  
sonar-scanner：2.8  
sonar-java-plugin：5.13.1

I want to scan the Java project before compiling，I found out after checking Sonar’s official website：I have to use Sonar.java.Binaries this parameter when the sonar-java-plugin version is higher than 4.1.0, Is there a way for me to scan before compilation without using Sonar.java.binaries parameter？

Looking forward to your reply!

---

<div class="post-metadata">

**Author:** ![Cameron](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/cameron/32/37_2.png) [@Cameron](https://community.sonarsource.com/u/Cameron)\
**Post date:** [June 30, 2021, 1:21pm UTC](https://community.sonarsource.com/t/can-i-not-use-sonar-java-binaries-parameters/45710/3 "2021-06-30T13:21:23Z")

</div>

Hi @smbands,

Welcome to the Community 😃

> [@smbands](#):
>
> Is there a way for me to scan before compilation

For on-the-fly analysis that doesn’t require a scan, you can use [SonarLint](https://www.sonarlint.org/) in your favourite IDE.

> [@smbands](#):
>
> I have to use Sonar.java.Binaries this parameter when the sonar-java-plugin version is higher than 4.1.0

If you want a full scan with SonarQube, then this is indeed true. We use the artefacts from the build to deepen the analysis and this has been in place for several years now. If you’re building your project with Maven or Gradle, you can use the SonarQube scanner for [Maven](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-maven/) or [Gradle](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-gradle/) and you get the configuration of _sonar.java.binaries_ for free.

One side note:

> [@smbands](#):
>
> sonarqube ：6.7.7  
> sonar-scanner：2.8  
> sonar-java-plugin：5.13.1

This is a pretty old configuration. You might want to look at our recent [SonarQube 8.9 LTS](https://www.sonarqube.org/sonarqube-8-9-lts/) for lots of new rules and functionality.

Regards,

Cameron.

---

<div class="post-metadata">

**Author:** ![smbands](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/smbands/32/23564_2.png) [@smbands](https://community.sonarsource.com/u/smbands)\
**Post date:** [July 1, 2021, 2:04am UTC](https://community.sonarsource.com/t/can-i-not-use-sonar-java-binaries-parameters/45710/4 "2021-07-01T02:04:22Z")

</div>

@Cameron  
😀Thanks for your reply!!!  
Our work required regular unified scanning of all the projects’ code, which was about 200 codebases.

The new version of SonarQube requires the sonar.java. binaries parameter, which means that it must be compiled before scanning, and it must be compiled successfully.

It may not be easy to implement the compilation task before scanning, so we would like to ask if there is any way to change the parameter sonar.java.binaries to not be required by using the new version of sonar-java-plugin.please tell me.

If there is no way, we can only use the Sonar-Java-Plugin 4.1.0 version. 😔  
Thanks a lot !!!  
Best wishes !

---

<div class="post-metadata">

**Author:** ![Cameron](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/cameron/32/37_2.png) [@Cameron](https://community.sonarsource.com/u/Cameron)\
**Post date:** [July 2, 2021, 9:38am UTC](https://community.sonarsource.com/t/can-i-not-use-sonar-java-binaries-parameters/45710/5 "2021-07-02T09:38:52Z")

</div>

HI @smbands,

> [@smbands](#):
>
> if there is any way to change the parameter sonar.java.binaries to not be required by using the new version of sonar-java-plugin

No, there is no way to do this. Our analyzer relies on information in the .class files to make sure you get a full, valuable analysis of your code.

I would really encourage you to get your code to compile before analysis so you can take advantage of the new rules in recent SonarQube versions – we have added a _lot_ of new high value rules to the Java analyzer since 4.1.0.

Regards,

Cameron.
