본문 바로가기
Memo/Note

[Error] Java main 실행 안 됨 | Java file outside of source root

by 달의 조각 2022. 7. 10.

문제

 

1. 자바 소스 파일 작성 후 Run 실행이 안 됨
2. 자바 파일이 소스 루트에 있지 않다는 메시지!

 

 

해결

 

https://stackoverflow.com/questions/63521181/java-file-outside-of-source-root-intellij

 

Java file outside of source root intelliJ

I have cloned a spring boot project from GitLab having multiple branches in IntelliJ. I checkout to the branch in which I want to work. But I am getting "Java file outside of source root"...

stackoverflow.com

 

1. 모듈 우클릭 후 Project Structure에 들어간다
2. Sources에 소스 파일이 있는 src 폴더 지정

 

해결 완료!

댓글