웹 개발

[Maven Error] you need to run build with jdk or have tools.jar on the classpath

노루아부지 2020. 4. 8. 09:51
You need to run build with JDK or have tools.jar on the classpath.If this occures during eclipse build make sure you run eclipse under JDK as well (com.mysema.maven:apt-maven-plugin:1.0.9:process:default:generate-sources)

 

위와 같은 오류 메시지가 발생하고 빌드가 안될 경우 eclipse.ini ( sts의 경우에는 sts.ini 또는 SpringToolSuite4.ini) 를 아래와 같이 수정하여 해결할 수 있습니다.

 

현상 확인

우선, 에러가 발생할 경우 아래와 같이 pom.xml의 execution에 에러가 표시됩니다.

 

pom.xml

 

해결방법

1. eclipse 또는 sts 설치 폴더로 이동하여 ini 파일 open

2. 아래와 같이 "-vm 자바설치경로/bin/javaw.exe" 추가

 

 

3. eclipse(sts) 재실행

4. 프로젝트 마우스 우클릭 > maven > update project (Alt + F5) 실행

728x90
loading