While working with eclipse J2EE IDE on Mac OS X system running 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.

Java Compiler Compliance level
More Posts related to Eclipse,
- How to show console in Eclipse IDE
- How to Configure GitHub with Eclipse IDE in 2023
- Fix: Eclipse Connection time out: github.com
- Java was started but returned exit code=13 [Eclipse]
- [Fix] Spring Tool Suite STS Code Autocomplete not working with Eclipse
- [Eclipse] Enable or Disable print margin line
- Eclipse Java: Multiple markers at this line error
- Java Decompiler Eclipse Plugin
- Compare Current and Previous Versions of Same File (Local History) in Eclipse
- Eclipse Error : The Eclipse executable launcher was unable to locate its companion shared library.
- Word-wrap Eclipse Console logs
- eclipse maven m2e : Cannot complete the install
- How to Save Eclipse console logs in external log file
- List of Code Snippets/Templates to Eclipse IDE
- How to Access Terminal (Command Line) in Eclipse IDE
- Installing JD Decompiler plugin in Eclipse IDE
- How to Reset Eclipse Theme to Classic
- Increase Font Size of Eclipse Java Code
- Eclipse: Updating Maven Project. Unsupported IClasspathEntry kind=4
- INVALID FILE NAME: MUST CONTAIN ONLY [a-z0-9_.] Android Eclipse Error
- Fix: Eclipse Cant Connect to any repository not Authorized Error GitHub
- [Eclipse] Syntax error, annotations are only available if source level is 1.5 or greater
- Add imports in eclipse shortcut key combinations
- Eclipse version 32-bit or 64-bit check on macOS
- How to create a Git Project in Eclipse (Step-by-step)
More Posts:
- Java - PatternSyntaxException - Java
- [Solution] Alpine Docker apt-get: not found - Docker
- 86 Gmail keyboard shortcuts that you may find Advantageous - Google
- Error 50057 - User account is disabled. The account has been disabled by an administrator [Microsoft - Teams - Azure] - Microsoft
- How to add Quotes at the Start and End of Each Line in Notepad++ - NotepadPlusPlus
- Android Wifi WPA2/WPA Connects and Disconnects issue - Android
- [Fix] zsh: command not found: nvm - MacOS
- [Solved] Error launching studio - Android-Studio