본문 바로가기
개발/etc

[리눅스] JDK 버전 2개 설치

by HW프로젝트 2024. 10. 29.

 

기존에 JDK 8 이 설치되어 있는 상태로 신규 진행하는 프로젝트 JDK 버전이 17 이라 JDK 버전차이로인해 오류가 발생했다.

 

Exception in thread "main" java.lang.UnsupportedClassVersionError: kr/co/project/gw/GwApplication has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

 

 

 

Open JDK 17 다운

https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/downloads-list.html

 

Downloads for Amazon Corretto 17 - Amazon Corretto 17

Thanks for letting us know this page needs work. We're sorry we let you down. If you've got a moment, please tell us how we can make the documentation better.

docs.aws.amazon.com

 

 

rpm -ivh https://corretto.aws/downloads/latest/amazon-corretto-17-x64-linux-jdk.rpm 명령어로 설치한다.

 

정상 설치된 것을 확인 할 수 있다.

 

JDK 버전을 변경하고 싶다면 update-alternatives --config java 를 입력하면 버전을 선택할 수 있다.