-2

Entered code when followed through tutorial.


public class HelloWorld {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
        System.out.println("test");
    }

}

This is the outcome of my code

Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: C:\Users\me\Desktop\CIS129\Eclipse files\HelloWorld\bin
Caused by: java.lang.module.InvalidModuleDescriptorException: HelloWorld.class found in top-level directory (unnamed package not allowed in module)
  • 1
    Does this answer your question? [InvalidModuleDescriptorException when running my first java app](https://stackoverflow.com/questions/51133398/invalidmoduledescriptorexception-when-running-my-first-java-app) – Guokas Jan 25 '21 at 02:39

1 Answers1

0

Deleting module-info.java might solve it. If it doesn't, then try creating a package and putting your code in that. Eclipse's interface should help a lot with the process of making a new package.

Lionel Foxcroft
  • 1,584
  • 3
  • 9
  • 23