views:

57

answers:

4

I imported a java project(war file) to eclipse. When I tried to run it , I got following error :

java.lang.Error: Unresolved compilation problems: 
The type List is not generic; it cannot be parameterized with arguments <User>
Syntax error, parameterized types are only available if source level is 5.0

I tried to google it. I found that I have to change compliance settings. I changed the compiler compliance level to 5 but it did not solve the problem. Can anybody help me to solve this problem? Thanks in advance.

+1  A: 

Check java version for your servlet container. You can check Java version in shell by typing

java -version

If its not 1.5+ point to relevant JDK of higher version..

Ck-
It is java "1.5.0_11" version.
A: 

That war is using 'generics' somewhere. and generics is only available with java 5 and above thats the error is saying

please check your java compiler level

Romani
I am using java version 1.5.0_11" .
+1  A: 
Bragboy
It is already 1.5+
You are right. Problem solved. Thanks.