When I ran into this same issue, I resolved it by changing work space.


Change the jre pointed by your server(tomcat or anything...) point to a JDK instead of JRE


Check for the version of JDK in Window --> Preferences -->Java compiler and then set the same JDK in Window --> Preferences -->Project Facets -->Java


1.Window Menu -> Preferences 2.On the left, select Server -> Runtime Environments 3.Highlight The server you want for your project and select the “Edit…” button 4.On the “Edit Server Runtime Environment” dialog, change the JRE to be a Java 7 JDK or JRE. 5.Rebuild your project and the error should go away.


Double click the Tomcat server->run time environment->installed jre->select jdk 1.7


I've just had the same thing. My solution was to remove the 1.6 JRE in Installed JRE's and tick the Java 1.7 one.

This can be found in Window --> Preferences --> Java --> Installed JRE's

Just as Boopathi says.


I had also encountered the same problem a while ago when upgrading from Java version 1.6 to 1.7. To resolve this I followed below steps.

  1. Right Click on the Project on Project Explorer and click on Properties.
  2. Navigate to Java Build Path > “Libraries”
  3. Delete any conflicted libraries which have red cross mark on the icons.
  4. Check & edit if necessary the JRE System Library Jars.
  5. Navigate to Project Facets and select the required java version.


Try them if you have not found the solution yet.



You need to check what type of JRE is there installed in your IDE,


Related Query

More Query from same tag