Reputation: 473
Why do I get 'annotations are not supported in -source 1.3' and 'generics are not supported in -source 1.3' even though I use jdk 1.6? I even checked the Build Path which points to jdk 1.6
FYI: Java Home: C:\Program Files\Java\jdk1.6.0_45\
and I use Eclipse Indigo and I don't have 1.3 at all in my machine.
Thanks.
Upvotes: 2
Views: 2868
Reputation: 213213
Eclipse comes with it's own compiler. It doesn't uses the environment variable you set on your machine, but just uses it's own project specific Build Path.
You need to set the Compiler compliance level to at least Java 5. Follow the below path to set the level:
Windows -> Preferences -> Java -> Compiler
There, set the compiler compliance level from drop-down.
Upvotes: 5