Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unsupported major.minor version 52.0 (unable to load class) [duplicate]

Tags:

java

When i run my project i am getting the following exception:

javax.servlet.ServletException: java.lang.UnsupportedClassVersionError: apache/commons/codec/UtilityUtil : Unsupported major.minor version 52.0 (unable to load class apache.commons.codec.UtilityUtil)

I have researched and found out that it happens if the version of java is different from runtime and compilation time.

I have followed these two posts and tried to figure out that i am using java 8 and runtime has 1.7.: Unsupported major.minor version 52.0 captive portal How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version

I have changed the compilation version to 1.7. But still the same problem exists. I dont know why.

Runtime version: 1.7.0_45 Compilation Version: 1.7.0_80.

like image 796
user7637864 Avatar asked Dec 06 '22 15:12

user7637864


1 Answers

This is a duplicate. The classes you are using are probably compiled with Java 1.8 and your jvm is 1.7. That also includes 3rd party jars

like image 84
efekctive Avatar answered Dec 08 '22 04:12

efekctive