While working with Eclipse J2EE IDE on a macOS system running the Yosemite Operating system, I got the following error message Syntax error, annotations are only available if source level is 1.5
I have configured JRE with Java version JRE 1.8, to fix this issue,
- Right-click on your project folder and select Properties
- Now click on Java Compiler
- Change the Java Compiler Compliance level to 1.7 or higher
- Apply changes
- Issue should be fixed.
Note that older versions of Eclipse IDEs do not support Java 8 version. You need to have Eclipse Kepler SR2 or Eclipse Luna versions for Java 8 support.

This is not an AI-generated article but is demonstrated by a human.
Please support independent contributors like Code2care by donating a coffee.
Buy me a coffee!

Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!