eclipse - Java compiler level does not match the version of the installed Java project -


i configuring spring boot project getting error "java compiler level not match version of installed java project facet". added java-version in pom.xml file. updated maven project. still facing same issue

here pom.xml file

<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">   <modelversion>4.0.0</modelversion>   <groupid>com.invoice</groupid>   <artifactid>invoice-project</artifactid>   <version>0.0.1-snapshot</version>   <packaging>war</packaging>    <parent>         <groupid>org.springframework.boot</groupid>     <artifactid>spring-boot-starter-parent</artifactid>     <version>1.4.2.release</version>     </parent>    <dependencies> <dependency>     <groupid>org.springframework.boot</groupid>     <artifactid>spring-boot-starter-web</artifactid>     <version>1.5.1.release</version><!--$no-mvn-man-ver$--> </dependency>          </dependencies>   <properties>         <project.build.sourceencoding>utf-8</project.build.sourceencoding>         <project.reporting.outputencoding>utf-8</project.reporting.outputencoding>         <java.version>1.8</java.version>     </properties>   </project> 

please in advance.

this error arises when project jdk version , jdk installed jdk version doesn't match

right click on project > properties > project facet > dynamic web project > choose 3.0/3.1 > click on apply > ok

also add java version in pom.xml file

   <properties>     <project.build.sourceencoding>utf-8</project.build.sourceencoding>     <project.reporting.outputencoding>utf-8</project.reporting.outputencoding>     <java.version>1.8</java.version> </properties> 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -