UnsupportedClassVersionError Java Error

冷暖自知 提交于 2019-12-02 19:09:48

问题


So I was trying to merge two databases using a java app called merjapp to merge sqlite databases, and I get this annoying java error message which I have no idea how to fix even after countless google searches. Here it is:

Exception in thread "main" java.lang.UnsupportedClassVersionError: con/merjapp/Merge has been compiled by a more recent version of the Java Runtime <class file version 8243.8224>, 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(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknow n Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at http://java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoa der.main(JarRsrcLoader.java:56)*

As I said before, I searched for solutions and many sites suggested upgrading the Java versions as to match JDK and JRE versions, but doing this does nothing to help, I also verified that they were the same version. I'm new to this so this might be a really easy error but I have no clue Anyone know how to solve this? Thanks for reading


回答1:


The version of the Java (compiler) used to compile merjapp classes is referred as: "8243.8224". Which is a quite strange version number (for Java), and not compatible with the version of the JRE you are running

See the msg:

"compiled by a more recent version of the Java Runtime <class file version 8243.8224>, this version of the Java Runtime only recognizes class file versions up to 52.0"

I suggest you to:

  • find/download other - more compatible - binaries of "merjapp"
  • or rebuild it from the sources (if available)


来源:https://stackoverflow.com/questions/51083742/unsupportedclassversionerror-java-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!