λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°
Java

[Java] Unsupported major.minor version 52.0 Error

by cheezzz 2022. 6. 10.
λ°˜μ‘ν˜•

ν”„λ‘œμ νŠΈ μ„ΈνŒ… 도쀑
java.lang.UnsupportedClassVersionError: org/springframework/util/StopWatch : Unsupported major.minor version 52.0 (unable to load class org.springframework.util.StopWatch)
λΌλŠ” μ—λŸ¬κ°€ λ°œμƒν•˜μ˜€μŠ΅λ‹ˆλ‹€.

version 52.0은 jar 파일의 λΉŒλ“œ jdk 버전을 λ‚˜νƒ€λƒ…λ‹ˆλ‹€.

숫자 별 μžλ°” 버전

Java SE 13 = 57 (0x39hex)
Java SE 12 = 56 (0x38 hex)
Java SE 11 = 55 (0x37 hex)
Java SE 10 = 54 (0x36 hex)
Java SE 9 = 53 (0x35 hex)
Java SE 8 = 52 (0x34 hex)
Java SE 7 = 51 (0x33 hex)
Java SE 6.0 = 50 (0x32 hex)
Java SE 5.0 = 49 (0x31 hex)
JDK 1.4 = 48 (0x30 hex)
JDK 1.3 = 47 (0x2F hex)
JDK 1.2 = 46 (0x2E hex)
JDK 1.1 = 45 (0x2D hex)

ν•΄λ‹Ή μ—λŸ¬λŠ” 컴파일 버전보닀 μ΄ν•˜ λ²„μ „μ—μ„œ μ‹€ν–‰λ˜μ—ˆμ„λ•Œ λ°œμƒν•˜λŠ” μ—λŸ¬μž…λ‹ˆλ‹€.
λ”°λΌμ„œ μžλ°” 버전을 1.8λ²„μ „μœΌλ‘œ μ„€μ •ν•΄μ£Όμ–΄μ•Ό ν•©λ‹ˆλ‹€.

 

ν•΄κ²°λ°©μ•ˆ

1. ν”„λ‘œμ νŠΈλͺ… 우클릭 > Properties

1) Java Build Path > jdk 1.8.0 μ‚¬μš©

2) Java Compiler > JDK Compliance > 1.8

3) Project Facets > Java > 1.8

2. Tomcat μ„œλ²„ > Classpath > jdk1.8.0 μ‚¬μš©


λ°˜μ‘ν˜•

λŒ“κΈ€