기타/에러

[에러/Java] Main method not found in class Test, please define the main method as: public static void main(String[] args)or a JavaFX application class must extend javafx.application.Application 해결

hrming 2022. 12. 10. 12:39

▶ 발생 에러 : Main method not found in class Test, please define the main method as: public static void main(String[] args)or a JavaFX application class must extend javafx.application.Application

 해결 방법 : 

1. 파일을 저장안하고 컴파일한경우 저장(ctrl+s) 확인
2. public static void main(String[] args) {} main메소드 확인
3. 이미 정의되어있는 클래스명 썼는지(라이브러리 포함) 클래스명 확인

 

(이런 에러메세지는 처음봤는데...저장을 안하고 돌리다니 바부탱.. 😒)

 


출처/참고:

https://gunu91.tistory.com/14

 

[java][error] 오류: testcode.Solution 클래스에서 기본 메소드를 찾을 수 없습니다. 다음 형식으로 기본

에러코드 오류: testcode.Solution 클래스에서 기본 메소드를 찾을 수 없습니다. 다음 형식으로 기본 메소드를 정의하십시오. public static void main(String[] args) 또는 JavaFX 애플리케이션 클래스는 javafx.appl

gunu91.tistory.com