How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version

The version number shown describes the version of the JRE the class file is compatible with. The reported major numbers are: (Source: Wikipedia) To fix the actual problem you should try to either run the Java code with a newer version of Java JRE or specify the target parameter to the Java compiler to instruct … Read more

Error: A JNI error has occurred, please check your installation and try again – during running Java program from Ubuntu terminal

The error says it all: Exception in thread “main” java.lang.UnsupportedClassVersionError: Test has been compiled by a more recent version of the Java Runtime (class file version 55.0)… You’ve compiled for Java 11 … but you’re running an older JRE (Java 8). SUGGESTIONS: recompile with -source and -target to target an earlier version of Java in your .class file, or … Read more

Exception in thread “main” java.lang.UnsupportedClassVersionError: a (Unsupported major.minor version 51.0)

Copy the contents of the PATH settings to a notepad and check if the location for the 1.4.2 comes before that of the 7. If so, remove the path to 1.4.2 in the PATH setting and save it. After saving and applying “Environment Variables” close and reopen the cmd line. In XP the path does … Read more

Unsupported major.minor version 52.0 [duplicate]

The issue is because of Java version mismatch. Referring to the JVM specification the following are the major versions of classfiles for use with different versions of Java. (As of now, all versions support all previous versions.) Java SE version Major version 1.0.2 45 1.1 45 (Not a typo, same version) 1.2 46 1.3 47 1.4 48 … Read more