I try to use the following code:
ArrayList<String> Map<String, String>
Eclipse complains 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?
This workaround is helpful when this problem pops up.
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 (for now at least).
It can be resolved as follows:
Go to Project properties.
Then 'Java Compiler' -> Check the box ('Enable project specific settings')
Change the compiler compliance level to '5.0' & click ok.
Do rebuild. It will be resolved.
Also, click the checkbox for "Use default compliance settings".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With