java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 52.0

版本为:

jdk1.7.0_80

mysql-connector-java-5.1.46-bin.jar

解决办法:

升级JDK或者降级MySQL Connector/J为mysql-connector-java-5.1.46-bin.jar

java.lang.UnsupportedClassVersionError: com/mysql/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:195)
at cn.itcast.demo3.JdbcUtils.getConnection(JdbcUtils.java:18)
at cn.itcast.demo3.Demo3.fun3(Demo3.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

原文地址:https://www.cnblogs.com/denggelin/p/9231886.html

时间: 2024-11-10 07:39:56

java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 52.0的相关文章

Unsupported major.minor version 52.0 处理方式

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/globalroam/openstack/OpenStackRestApi : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLo

java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0解决办法

androidstudio编译程序时出现java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0.Unsupported major.minor version 52.这个错误是由于(jdk)高版本的java project使用了低版本的来运行.使用命令(java -version 和 javac -version)查看java

java.lang.UnsupportedClassVersionError: org/hibernate/SessionFactory : Unsupported major.minor version 52.0

问题: 在学习hibernate的过程中,涉及导入jar包的问题,写该文的时候是从官网下载的最新的hibernate的jar包hibernate-release-5.2.10.Final .在测试时,出现了Unsupported major.minor version 52.0 解决: 百度了一下,version 52.0匹配的是jdk1.8,我本机是jdk1.7,修改jdk解决.但是不建议用最新的hibernate包.

异常:Unsupported major.minor version 52.0 (Use --stacktrace to see the full trace)

异常:Unsupported major.minor version 52.0 (Use --stacktrace to see the full trace) 正在写一个功能,更新了同事提交的代码之后,出现了如下错误: 1 Fatal error during compilation org.apache.tools.ant.BuildException: java.lang.UnsupportedClassVersionError: org/elasticsearch/index/query

JDK报错Unsupported major.minor version 52.0

一.问题描述: 新建web项目,由于我配置的Tomcat 6依赖jdk 1.8,所以新建的工程在jdk1.8环境下生成.当我把jdk改成1.6版本时,运行main方法或其他,则 报以下错误: java.lang.UnsupportedClassVersionError: PR/Sort : Unsupported major.minor version 52.0 二.解决方案: 在Window -->Properties-->JAVA --> Compiler-中的Compiler co

MyEclipse 下 Unsupported major.minor version 52.0 报错

在Myeclipse2014 下做个一次测试jdbc数据库的代码如下: import java.sql.*; public class sqlTest { public static void main(String[] srg) throws ClassNotFoundException { Connection con; Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); try { con=DriverMa

ERROR Review:Unsupported major.minor version 52.0

最近将AS从2.1.2升级至2.2版本后,项目编译报出了如下错误: java.lang.UnsupportedClassVersionError: com/android/build/gradle/LibraryPlugin : Unsupported major.minor version 52.0 经过查找发现,AS升级到2.2以后,其内置的jdk版本也同时升级到了jdk1.8,AS则会在项目Setting中提示建议你使用其内置的jdk版本: 当你勾选了下图中Use embedded JDK

Ant编译提示“Unsupported major.minor version 52.0”

今天在使用Ant编译build.xml文件时报错"java.lang.UnsupportedClassVersionError:com/sun/tools/javac/Main : Unsupported major.minor version 51.0",很明显是JDK版本不一致所导致的,但是我用的JDK8,Eclipse配置貌似也都正常(Windows——Preferences——Java——Compiler(配置的为1.8)——Installed JREs(勾选的是JDK1.8的

Weblogic报错:Unsupported major.minor version 52.0

java.lang.UnsupportedClassVersionError: com/minstone/zofficeservice/action/MainServlet : Unsupported major.minor version 52.0. at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:551) at weblogic.servlet.internal.ServletS