Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse chokes on enum, even though Compiler compliance level is 1.6

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

enter image description here

like image 474
Nicolas Raoul Avatar asked Dec 22 '11 01:12

Nicolas Raoul


1 Answers

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.

like image 178
José antonio Huamán Layme Avatar answered Nov 13 '22 08:11

José antonio Huamán Layme