# Cannot Scan Java Applicaiton

**URL:** <https://community.sonarsource.com/t/cannot-scan-java-applicaiton/59092>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube, scanner, java\
**Created:** [February 28, 2022, 4:30pm UTC](https://community.sonarsource.com/t/cannot-scan-java-applicaiton/59092 "2022-02-28T16:30:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hazenvs](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/hazenvs/32/30868_2.png) [@hazenvs](https://community.sonarsource.com/u/hazenvs)\
**Post date:** [February 28, 2022, 4:30pm UTC](https://community.sonarsource.com/t/cannot-scan-java-applicaiton/59092/1 "2022-02-28T16:30:28Z")

</div>

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

When attempting to assess a java application i recieve the following error:  
11:27:01.307 ERROR: Error during SonarScanner execution  
org.sonar.java.AnalysisException: Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property.

When scanning I have configured a sonar-project.properties however the following directives are not populated correctly:  
11:27:01.039 INFO: Sensor JavaSensor [java]  
11:27:01.269 INFO: Configured Java source version (sonar.java.source): none  
11:27:01.272 INFO: JavaClasspath initialization  
11:27:01.274 DEBUG: Property ‘sonar.java.jdkHome’ resolved with:  
  
11:27:01.274 DEBUG: Property ‘sonar.java.libraries’ resolved with:  
**strong text**

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [February 28, 2022, 4:45pm UTC](https://community.sonarsource.com/t/cannot-scan-java-applicaiton/59092/2 "2022-02-28T16:45:45Z")

</div>

Hey there.

The analysis of Java code requires a compilation of the application – most commonly this is orchestrated using the [SonarScanner for Maven](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-maven/) or [SonarScanner for Gradle](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-gradle/). What build tool is used to build your Java code?

---

<div class="post-metadata">

**Author:** ![hazenvs](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/hazenvs/32/30868_2.png) [@hazenvs](https://community.sonarsource.com/u/hazenvs)\
**Post date:** [March 1, 2022, 6:51pm UTC](https://community.sonarsource.com/t/cannot-scan-java-applicaiton/59092/3 "2022-03-01T18:51:32Z")

</div>

This one uses ANT apperantly, I’ll have to get the Build completed using ANt then integrate with the Sonar Scanner for ANT.
