Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Does Not Recognize JRE 8 as Greater Than JRE 5

I have installed Java 8 on my machine and have started a project with it. However, when I use an @Override annotation, the code is underlined in red, and the error Syntax error, annotations are only available if source level is 1.5 or greater appears.

I have installed the released Eclipse Java Development Tools Patch with Java 8 support (for Kepler SR2), but this only adds support for new features in Java 8, and does not fix the bug with annotations.

like image 938
Dave C Avatar asked Sep 30 '22 22:09

Dave C


1 Answers

Make sure your INSTALLED_JRE is pointing to jdk 1.8 in eclipse

Preference > java > installed_jre

Make sure java > compiler is set to 1.8 in eclipse

preference > java > compiler > compiler compliance level 
like image 178
jmj Avatar answered Oct 03 '22 13:10

jmj