오류 내용
java.lang.UnsupportedClassVersionError: : Unsupported major.minor version 52.0 (unable to load class )
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3255)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1420)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1924)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1798)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:250)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:394)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1397)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1344)
... 19 more
원인 :
컴파일은 JAVA 1.8로 하고 실행은 이하버전에서 하려고 할때 위 오류 발생
해결:
버전 맞춰서 재컴파일하면 됌
참고 :
Version 뒤에 숫자는 아래와 같은 버전을 의미 한다.
J2SE 8 = Version 52
J2SE 7 = Version 51
J2SE 6.0 = Version 50
J2SE 5.0 = Version 49
JDK 1.4 = Version 48
JDK 1.3 = Version 47
JDK 1.2 = Version 46
JDK 1.1 = Version 45
출처: https://dwfox.tistory.com/25 [DWFOX]