错误:has been compiled by a more recent version of the Java Runtime (class file version 56.0)

  具体错误如下:

java.lang.UnsupportedClassVersionError: com/XXX has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 52.0 (unable to load class com.XXX)
	org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3255)

  意思就是编译时使用了56.0版本,执行时的JDK/JRE使用了52.0版本。两个办法:

  • 升级一下JDK。
  • 使用运行的JDK重新编译。
已标记关键词 清除标记
相关推荐
idea 2020 1 2 启动报错 ,jdk1.8 项目设置的都是1.8,不知道是撒问题 ``` Error:Internal error: (java.lang.UnsupportedClassVersionError) jetbrains/mps/jps/model/impl/JpsMPSModelSerializerExtension has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 java.lang.UnsupportedClassVersionError: jetbrains/mps/jps/model/impl/JpsMPSModelSerializerExtension has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:756) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) at java.net.URLClassLoader.access$100(URLClassLoader.java:74) at java.net.URLClassLoader$1.run(URLClassLoader.java:369) at java.net.URLClassLoader$1.run(URLClassLoader.java:363) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) at java.util.ServiceLoader$1.next(ServiceLoader.java:480) at com.intellij.util.containers.ContainerUtilRt.copy(ContainerUtilRt.java:114) at com.intellij.util.containers.ContainerUtilRt.newArrayList(ContainerUtilRt.java:99) at com.intellij.util.containers.ContainerUtil.newArrayList(ContainerUtil.java:232) at org.jetbrains.jps.service.impl.JpsServiceManagerImpl$SingleClassLoaderPluginManager.loadExtensions(JpsServiceManagerImpl.java:116) at org.jetbrains.jps.service.impl.JpsServiceManagerImpl.loadExtensions(JpsServiceManagerImpl.java:108) at org.jetbrains.jps.service.impl.JpsServiceManagerImpl.getExtensions(JpsServiceManagerImpl.java:71) at org.jetbrains.jps.model.serialization.JpsModelSerializerExtension.getExtensions(JpsModelSerializerExtension.java:43) at org.jetbrains.jps.model.serialization.library.JpsSdkTableSerializer.getSdkPropertiesSerializer(JpsSdkTableSerializer.java:205) at org.jetbrains.jps.model.serialization.library.JpsSdkTableSerializer.loadSdk(JpsSdkTableSerializer.java:99) at org.jetbrains.jps.model.serialization.library.JpsSdkTableSerializer.loadSdks(JpsSdkTableSerializer.java:80) at org.jetbrains.jps.model.serialization.JpsGlobalLoader$SdkTableSerializer.loadExtension(JpsGlobalLoader.java:142) at org.jetbrains.jps.model.serialization.JpsGlobalLoader$SdkTableSerializer.loadExtension(JpsGlobalLoader.java:135) at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponents(JpsLoaderBase.java:46) at org.jetbrains.jps.model.serialization.JpsGlobalLoader.loadGlobalComponents(JpsGlobalLoader.java:80) at org.jetbrains.jps.model.serialization.JpsGlobalLoader.load(JpsGlobalLoader.java:70) at org.jetbrains.jps.model.serialization.JpsGlobalLoader.loadGlobalSettings(JpsGlobalLoader.java:43) at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:36) at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:34) at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:77) at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:274) at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:130) at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:218) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) ```
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页