728x90
반응형
사이드 프로젝트 파일을 받아 빌드를 시도해보았지만 JVM 버전 때문에 에러가 났다.
A problem occurred configuring root project 'app'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.3.1.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.3.1
> Dependency requires at least JVM runtime version 17. This build uses a Java 8 JVM.
* Try:
> Run this build using a Java 17 or newer JVM.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
사이드 프로젝트의 자바 버전은 17이지만,
지금 내 노트북에 있는 자바 버전은 8이라서 생긴 문제이다.
해당 프로젝트의 자바 버전을 변경해줘야 빌드가 될 것 같다.
1. Project Structure (Ctrl + Shitf + Alt + S)
1-1. Project Settings - Project
SDK와 Language level을 변경하면 된다.
변경 후 Apply 클릭하여 적용해주면 된다.
1-2. Modules
Modules - Sources - Language level에서 17을 선택 후 Apply
1-3. SDKs
Platform Settins - SDKs에서 17 버전이 있는지 확인 후 OK 버튼 클릭
2. Settings (Ctrl + Alt + S)
2-1. Build, Execution, Deployment - Build Tools - Gradle - Gradle JVM 변경
gradle을 사용한 프로젝트이며, gradle JVM 버전이 현재 1.8로 되어 있어 17로 수정하겠다.
Gradle JVM 버전을 수정한 후 Apply
2-2. Build, Execution, Deployment - Compiler - Java Compiler - Project bytecode version
Project bytecode version이 설정이 되어 있지 않아 17로 설정해주겠다.
Project bytecode version을 17로 변경한 후 Apply - OK 버튼 클릭
3. Module JDK is not defined - Setup SDK
앞서 모든 설정들을 변경한 후 프로젝트로 돌아왔는데 해당 경고문이 보여서 일단 Setup SDK 클릭하여 변경해주었다.
4. 빌드 실행
4-1. Build 시도
빌드를 실행했는데 성공적으로 빌드가 완료된 것 같다.
이제 어플리케이션을 실행해 볼 차례이다.
4-2. 어플리케이션 실행
잘 실행되었다.
이제 html이 제대로 작동하나 확인해보겠다.
4-3. 웹 확인
http://localhost:8080 접속하여 확인했더니 웹이 잘 작동한다.
728x90
반응형
'[Language] > Java | Spring | JSP' 카테고리의 다른 글
[Eclipse/Java] Syntax error on token "Invalid Character", delete this token (0) | 2024.07.29 |
---|---|
Eclipse에 STS4 설치하기 (0) | 2024.07.18 |
[Eclipse] JRE 1.8 라이브러리 변경 & Java 컴파일러 버전 변경 (0) | 2024.07.09 |
java.net.ConnectException: Connection timed out: connect (0) | 2024.06.27 |
[Java Swing] 0. Swing으로 버튼 만들기 (JButton Component) (0) | 2024.06.18 |