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.access100ドル(Unknown Source)
at http://java.net.URLClassLoader1ドル.run(Unknown Source)
at java.net.URLClassLoader1ドル.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
-
2The error suggests that the class is not a Java classMark Rotteveel– Mark Rotteveel2018年06月28日 13:13:17 +00:00Commented Jun 28, 2018 at 13:13
3 Answers 3
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)
1 Comment
I had this same problem, but then I realized it was because I didn't have JAVA JDK (java development kit). to get this you can go to the link bellow and install java JDK.
https://www.oracle.com/java/technologies/downloads/#jdk17-windows
Comments
I also had this problem when I used Visual Studio Code and it's built-in terminal. To Fix It,
Go To the Below path,
C:\Program Files (x86)\Common Files\Oracle\Java\javapath {for newer} or C:\Windows\System32 {for older}
and
rename java.exe to java.old.exe
Then my error was desappered.