본문 바로가기
코딩테스트/자바 Java

자바 JAVA | java.lang.module.findexception 에러 해결 방법 | 간단한 방법, 프로젝트 생성

by YUNI Heo 2023. 2. 14.
반응형

 

✅ java.lang.module.findexception 에러 해결 방법

💡 모듈 module 에러 발생

  • 자바 프로그램을 실행하고 다음과 같은 오류가 발생하였다.
Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: C:\Users\@@@\eclipse-workspace\Exam\bin
Caused by: java.lang.module.InvalidModuleDescriptorException: Hello.class found in top-level directory (unnamed package not allowed in module)


  • 모듈 module을 읽는데 에러가 발생한 것이다.

 

💡 모듈 module 에러 해결

가장 간단한 방법은 module-info.java 파일을 삭제하는 것이다.


java.lang.module.findexception 에러가 다시 발생하지 않기 위해서는 프로젝트 생성 시 다음과 같은 과정을 가지면 된다.

  • 프로젝트 이름을 입력한다.
  • [Create module-info.java file]를 해제한다.
  • [Finish]를 클릭한다.

반응형