saving . . . saved Error Message has been deleted. Error Message has been hidden .
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 14-04-20, 4:31 p.m. haricnair86

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
15-04-20, 1:10 p.m. kashmira.n


can you please provide screenshots
16-04-20, 8:08 a.m. srinivasrj129@gmail.com


Log-in to answer to this question.