In this video, I’m going to show the famous UnsupportedClassVersionError, e.g. below. Why it happens and how to solve it.
Exception in thread "main" java.lang.UnsupportedClassVersionError: HelloWorld has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognises class file versions up to 52.0
We have two solutions:
1. compile our code for an earlier version of Java ;
2. run our code on a newer Java version ;
If you have this problem with a JAR, you have two solutions:
1. If the jar is yours, compile the project/jar to your JVM version using source/target or release;
2. If the JAR isn't yours, you'll have to use a newer version of the JDK;
Major versions mapped to Java versions:
45 - Java 1.1
46 - Java 1.2
47 - Java 1.3
48 - Java 1.4
49 - Java 5
50 - Java 6
51 - Java 7
52 - Java 8
53 - Java 9
54 - Java 10
55 - Java 11
56 - Java 12
57 - Java 13
58 - Java 14
59 - Java 15
60 - Java 16
61 - Java 17
See more about the class file format in this link:
https://docs.oracle.com/javase/specs/...
Watch video UnsupportedClassVersionError how to solve online without registration, duration hours minute second in high quality. This video was added by user Mr Debugger 24 August 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,33 once and liked it people.