Wednesday, May 7, 2014

Eclipse: Syntax Error, parameterized types are only if source level is 1.5

When I developed my Java application, the following error occured:
Syntax Error, parameterized types are only if source level is 1.5 blabla

After digging around in Google, it seems that we have to change the default configuration of Java compiler for our project. It has been discussed in StackOverflow.com, and I found that post from VigneshKumar S precisely answered my problem.

So, what should we do? here what he says

  1. Go to project properties
  2. Then 'Java Compiler' -> Check the box ('Enable project specific settings')
  3. If 'use compliance from execution blabla' is checked, uncheck it first. Then, check the 'use default compliance settings'
  4. Change the compiler compliance level to '5.0' & click OK.
  5. Rebuild your project
Then, the error will disappear.

No comments:

Post a Comment