I have set my Eclipse project's Compiler compliance level
to 1.6
But I get errors like in the screenshot below: Syntax error, annotations are only available if source level is 1.5
.
I have refreshed/cleaned/restarted Eclipse at least 10 times.
It compiles fine with Maven2. The Eclipse project has been generated by Maven2.
The project uses java-6-openjdk
Other solution:
1) Set Workspace JRE to 1.5 (and apply/save). Projects will rebuild.
2) Set Workspace JRE back to 1.6 (and apply/save). Projects will rebuild.
All errors are then gone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With