Error Message
Title
Question
I CANT RUN THE PROGRAM, IT SHOWS AN ERROR MESSAGE. IT SAYS "Must declare a named package because this compilation unit is associated to the named module 'EclipseDemo' DemoClass.java /EclipseDemo/src line 1 Java Problem" AND "Error occurred during initialization of boot layer java.lang.module.FindException: Error reading module: F:\Users\User\eclipse-workspace\EclipseDemo\bin Caused by: java.lang.module.InvalidModuleDescriptorException: DemoClass.class found in top-level directory (unnamed package not allowed in module)".
Java Getting-started-java-Installation 01-02 min 10-20 sec
Answers:
Hi,
A few helpful links that I came across -
- https://stackoverflow.com/questions/53033899/must-declare-a-named-package-eclipse-because-this-compilation-unit-is-associated
- https://stackoverflow.com/questions/51803456/error-must-declare-a-named-package-because-this-compilation-unit-is-associated
Login to add comment