Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse magic: ... Syntax error, varargs are only available if source level is 1.5 or greater

Tags:

java

eclipse

Yesterday I made a project in eclipse, and it was working, compiling. I used Eclipse Galileo for Java EE. Today I open eclipse and see lots of errors saying that stuff is not available and that it is only available if source level is 1.5.

What to do?

like image 449
Omu Avatar asked Nov 15 '09 05:11

Omu


2 Answers

Check whether this works:

  1. Go to your project's Properties
  2. On the Properties dialog choose the Java Compiler node in the left tree.
  3. Finally set the Compiler compliance level to 1.5 or more.
  4. Rebuild the project.
like image 62
Suraj Chandran Avatar answered Sep 20 '22 21:09

Suraj Chandran


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... :)

like image 26
Jyo the Whiff Avatar answered Sep 20 '22 21:09

Jyo the Whiff