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,
- 300+ Eclipse IDE Keyboard Shortcuts for Mac
- How to Word wrap eclipse console logs width
- [Eclipse] Enable or Disable print margin line
- Syntax error, parameterized types are only available if source level is 1.5 or greater [Java]
- How to Change Eclipse Default Web Browser
- How to run a Maven jar project from eclipse without tomcat
- [Fix] Spring Tool Suite STS Code Autocomplete not working with Eclipse
- eclipse maven m2e : Cannot complete the install
- Installing JD Decompiler plugin in Eclipse IDE
- How to enable line numbers in Eclipse IDE
- Eclipse Error : The Eclipse executable launcher was unable to locate its companion shared library.
- Install Eclipse IDE on M1 Mac Natively
- How to remove unwanted Java imports in IntelliJ (alternative of eclipse Ctrl + Shift + O)
- Word-wrap Eclipse Console logs
- Eclipse Error The JVM Shared Library JavaVirtualMachines does not contain the JNI_CreateJavaVM symbol
- How to switch Eclipse IDE Workspace
- How to Reset Eclipse Theme to Classic
- [Eclipse] Syntax error, annotations are only available if source level is 1.5 or greater
- Java was started but returned exit code=13 [Eclipse]
- How to use Content Assist in Eclipse IDE
- Java Decompiler Eclipse Plugin
- Search text in Eclipse Console logs
- How to Save Eclipse console logs in external log file
- Eclipse version 32-bit or 64-bit check on macOS
- How to display Line Number in Eclipse IDE
More Posts:
- Difference between using Scanner Class and String args for user input in Java - Java
- New-SPLogFile PowerShell - create new SharePoint log file - SharePoint
- Maven : java.lang.ClassNotFoundException: Xmx512m - Android
- Find Difference of two numbers - C-Program
- How to take user input from the console in a Python program - Python
- How to start or open a new bourne-again shell (bash) session on Windows using Command Line CMD - Bash
- How to Import External Jars to Android Studio Project - Android-Studio
- Exception in thread main java.lang.NoClassDefFoundError: package javaClass - Java