Unsupported Major.minor version 51.0 the JDK does not conform to the JDK versions referenced by MAVEN when configuring/running MAVEN Engineering

Source: Internet
Author: User
Tags unsupported

During the configuration of the MAVEN project, the following error was encountered during the deployment to the Tomcat server to run:

1 " "

The reason for the error is that the JDK version referenced by Maven is inconsistent with the version referenced by Tomcat, and the solution is as follows:

1. Modify the JDK version of MAVEN to 1.7:

A) in Maven's setting file, add

Add the following profile elements under the Profiles element in the Setting.xml file <profile>    <id>jdk17</id>    < Activation>        <activeByDefault>true</activeByDefault>        <jdk>1.7 </jdk>    </activation>    <properties>        <maven.compiler.source>1.7 </maven.compiler.source>        <maven.compiler.target>1.7</maven.compiler.target>        <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>    </ Properties>    </profile>

b) Add the following build element to the project's Pom,xml file

<build>    <plugins>        <plugin>            <groupid>org.apache.maven.plugins</groupid >            <artifactId>maven-compiler-plugin</artifactId>            <configuration>                <source >1.7</source>                <target>1.7</target>            </configuration>        </plugin>    </plugins></build>

c) myeclipse->windows->perference-> Find maven-> Modify JDK version (optional)

2. Modify the JDK version of Tomcat:

Myeclipse->window->servers->tomcat->tomcat7.x->jdk-> to 1.7 (same as MAVEN)

Unsupported Major.minor version 51.0 the JDK does not conform to the JDK versions referenced by MAVEN when configuring/running MAVEN Engineering

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.