### Details

```
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/mysql/cj/jdbc/Driver : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:278)

```

### System:

Windows 64

### Platform:

Eclipse Neon.1

Maven 3

### Java

java 1.8 and java 1.7 both installed

JAVA\_HOME point at 1.8 jdk
PATH = %PATH%;%JAVA\_HOME%/bin/

### Eclipse execution Java application

```
path\to\Java\jdk1.7.0_80\bin\javaw.exe

```

### Eclipse project *build path*

```
JRE System Library [JavaSE-1.7]

Maven Dependencies

```

### pom.xml

```
<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>

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.4.2.RELEASE</version>
  </parent>

  <groupId>com.worldline.cn.workbench</groupId>
  <artifactId>orm-base</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>orm-base</name>
  <description>orm-base</description>

    <properties>
        <java.version>1.7</java.version>
    </properties>

  <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-spring</artifactId>
            <version>1.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.4.1</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>6.0.5</version><!--$NO-MVN-MAN-VER$-->
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>1.5.2.RELEASE</version>
            <scope>test</scope>
        </dependency>

    </dependencies> 

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

```

Anything needed?

I know this happens usually because:

A project is compiled by java 1.8, but executed by java 1.7 (or lower).

But I checked my Eclipse,

Java Compiler:

```
checked *use compliance from execution environment 'Java SE-1.7' on the 'Java Build Path'*

checked *enable project specific settings*

```

Run configuration:

```
JRE tab:

    Runtime JRE:

        checked: *Project execution environment 'JavaSE-1.7'(jdk1.7.0_80)*

```

So you see, I compiled the project with 1.7 and run it with 1.7...