InvalidModuleDescriptorException when running java program in Eclipse IDE

When you run your first Java program, there are times when you will receive the below error

Error occurred during initialization of boot layer java.lang.module.FindException: Error reading module: C:\Users\Senthil\eclipse-workspace\HelloWorld\bin Caused by: java.lang.module.InvalidModuleDescriptorException: HelloWorld.class found in top-level directory (unnamed package not allowed in module)

The fix for this error is simple. Just delete the module-info.java and run your Main.java file and you should see the program running with out any issues.