Please provide compiled classes

Hi, my analysis has failed
this is the error that the github console shows:
ERROR: Error during SonarScanner execution

[79]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.

What i have to do?
thanks for your time

Hi,

Welcome to the community!

What does that error message mean to you?

 
Ann

if i exclude .java files, giving .class files, my analysis go well but sonar don’t recognise issues.
if i keep .java files, i see this error and code analysis doesn’t work

Hi,

Yes, if you provide .java files, you also need to provide .class files. That means you need to compile before you run analysis. Then you’ll have .class files to feed into analysis.

Aaand… I’ve just noticed the autoscan tag on your post. Are you using autoscan?

 
HTH,
Ann

yes but i don’t know how to analyze multiple .java files with sonar. i searched online but i can’t find an answer
and yes, i am using autoscan

Hi,

Okay, sorry I overlooked autoscan to start with. If you’re using it, you shouldn’t be getting that message.

I’m going to flag this for other eyes.

 
Ann

1 Like

Hello Gerardo.

Can you please look for “Analysis ID”, it should be specified in error message on sonarcloud.io project tab.

hi
I managed to fix the error myself, it ended up being a problem with the sonar analysis configuration file.
Anyway thanks for the support

1 Like

Happy to hear that you have found the solution!