eclipse magic: ... Syntax error, varargs are only available if source level is 1.5 or greater
Check whether this works:
- Go to your project's
Properties
- On the Properties dialog choose the
Java Compiler
node in the left tree. - Finally set the
Compiler compliance level
to 1.5 or more. - Rebuild the project.
Just make sure Java > Installed JREs has jre6 instead of jdk1.6.0
Eclipse seems detect jdk6 as not jre 1.5+
Single answer couldn't solve my problem so I used both :
- First right click on the error in problems tab
- click Quick fix
- ok
- right click on the project
- build path
- configure build path
- remove JRE library
- add JRE library
.... tada...done... :)