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.
There are two things you might have to take care of.
I guess you should have taken care of (1). What you may have missed is the second one. When you try to run that war file, go to “Run As” –> “Run configurations”. There you can select the Java version. I assume this is the place you are having an issue. Try setting it to Java 1.5 or higher.
http://img638.imageshack.us/img638/8845/runconfig.jpg