STS - Editor does not contain a main type 에러 해결방법
Editor does not contain a main type 해결 방법
- test 폴더에서 main 메서드를 실행했더니
Editor does not contain a main type
에러가 발생했다. - 해당 에러는 다양한 원인이 있는 것으로 보인다.
- 나는 아래 방법을 통해 해결했다.
Build Path 설정
-
[프로젝트 우클릭] → [Build Path] → [Source] 탭 이동
-
아래와 같이 Source Folders에
src
만 추가되어 있는 경우test
에서는 main 메서드가 실행되지 않는다.
- [Add Folder] 클릭해서
test
폴더를 추가해주자.
test
폴더가 추가되었다.Apply and Close
하면 끝.
댓글남기기