Please provide compiled classes

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

[79] Your project contains .java files, please provide compiled classes with property, or exclude them from the analysis with sonar.exclusions property.

What i have to do?
thanks for your time


Welcome to the community!

What does that error message mean to you?


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


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?


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


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.


1 Like

Hello Gerardo.

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

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!