Editor does not contain a main type 이라고도 뜨는거 같은데
오류창 그대로 Main 메소드가 문제 있는 경우다.
메인함수에 pubilc static void main(String[] args)함수를 잘 썼는지 확인하고
현재 작성중인 파일이 src폴더 안에 들어가있는지 확인.
https://stackoverflow.com/questions/16225177/error-selection-does-not-contain-a-main-type
Error: Selection does not contain a main type
I am trying to run some java files in a new project. So I make the project, put the files in it and I try to run the main file so my game starts. I get an error that says selection does not conta...
stackoverflow.com
만약 자바파일이 src폴더 밖에 있는경우
==> scr폴더가 없다면 프로젝트 우클릭 -> Java Build Path -> Source -> Add Folder를 눌러 src폴더를 만들어주고 그 안에 자바 클래스 파일을 넣기
프로젝트에서 JDK를 인식하지 못하는 경우
==> 프로젝트 우클릭 -> Project Facets -> Java를 사용하고 있는 버전으로 바꿔주
https://coding-factory.tistory.com/731
[IDE] 이클립스 Editor does not contain a main type 에러 해결
이클립스에서 자바 프로젝트를 컴파일할때 위와 같은 Editor does not contain a main type이라는 에러가 발생하거나 Selection does not contain a main type 에러가 발생할때의 대처방법에 대해서 알아보도록 하겠
coding-factory.tistory.com
'error.problem' 카테고리의 다른 글
자바 오류(ArrayIndex) Index~ out of bounds for length~ (0) | 2023.09.08 |
---|---|
자바 오류 not a statement~ (0) | 2023.09.08 |
자바 이클립스 오류(Unable To Launch) The selection cannot be launches, and there are no recent launches. 해결 (0) | 2023.08.23 |
sts3: Plug-in org~~gettingstarted was unable to load class~ (0) | 2023.05.05 |
sts4툴에서 markspace로 sts 3추가시 문제발생 (0) | 2023.05.05 |