tags:

views:

106

answers:

2

I try to use this

ArrayList<String>
Map<String, String>

Eclipse complain about both of them: Syntax Error, parameterized types are only if source level is 1.5. I use JDK 1.6, but even if I go to compiler and switch the compliance to 1.5. It still give me this error. Any Idea why?

A: 

Right click your project and choose properties in the properties dialog check the Java Compiler settings, maybe you have different workspace settings.

stacker
+2  A: 

my guess would be that while you run eclipse itself with jdk 1.6, it's actually configured with a different default jre. see window->preferences->java->Installed JREs and make sure that the checked JRE is 1.6.

if the default JRE is indeed 1.6, chances are that it's a project specific setting. see that the project is configured to use the right jre.

Omry