Tool/Eclipse
[Error] Editor does not contain a main type
dev?
2022. 1. 1. 20:02
반응형
Editor does not contain a main type
[원인]
main 함수가 없었다.
[해결]
1. 자바 클래스 파일이 src폴더 밖에 있다.
2. 혹은 클래스 파일을 감싸는 패키지가 아예 없다. (default 패키지도 없을 때)
3. build path를 빼먹었을 때 (ojdbc6.jar) : 이클립스라기보다 STS3.0 등 스프링에서 열었을 때
4. 프로젝트를 다른 데에서 불러왔을 경우
5. 메인 함수가 없거나 오타가 있다.
--public static void main(String[] args)
출처:
https://coding-restaurant.tistory.com/128
자바 이클립스 editor does not contain a main type 오류 원인
자바 이클립스 editor does not contain a main type 오류가 뜰 경우 오류의 원인이 되는 경우를 정리해보았습니다. 분명히 코드는 되는 코드인데 이 오류가 뜬다면 체크해봐야할 것. 1. 자바 클래스 파일
coding-restaurant.tistory.com
반응형