1

I am an absolute beginner when comes to Java and I just installed eclipse. When running my first project I see this strange error that I don't think has anything to do with my code:

Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: C:\Users\Filip\eclipse-workspace\Bomberman\bin
Caused by: java.lang.module.InvalidModuleDescriptorException: CONSTANT_Module at entry 8 is zero length

Do you guys have any advice?

Philip Nelson
  • 1,027
  • 12
  • 28
Filip
  • 13
  • 6
  • Does this answer your question? [InvalidModuleDescriptorException when running my first java app](https://stackoverflow.com/questions/51133398/invalidmoduledescriptorexception-when-running-my-first-java-app) – priyranjan Nov 24 '20 at 15:12

1 Answers1

0

This might probably be coz while creating your own class you might have also accepted to create a default class as prescribed by your IDE. If that's the case try this: go to PROJECT folder -> src folder -> Default package keep only one class(in which you had written code) and delete another one.

Perhaps downgrading the java version and re-creating the project will help

WBLord
  • 874
  • 6
  • 29
  • I do not have a default class, however, I do have a default package that I cannot delete. My classes are under a package that I created. – Filip Nov 24 '20 at 15:14
  • Can add screenshot? – WBLord Nov 24 '20 at 15:24
  • To be honest, I don't really understand the error. Try to recreate the project or install Java 8 – WBLord Nov 24 '20 at 15:59
  • 1
    Recreating the project worked. Thank you WBLord! The only thing I did different compared to the initial project was to add an execution environment from the beginning (the JavaSE-1.7 (jre)). The first time I added it AFTER the creation of the project. – Filip Nov 24 '20 at 18:35
  • @Filip No problem, u can mark this like problem solution – WBLord Nov 24 '20 at 18:38
  • 1
    Is there a way I can mark a specific comment or I should just mark your answer? This was my first question , I am a beginner here as well. :D – Filip Nov 24 '20 at 18:42
  • There is no way to mark a comment. I will update the answer so that it is correct. – WBLord Nov 24 '20 at 18:44
  • 1
    Sure, take a look at what I edited in my previous comment as well. May be of help. – Filip Nov 24 '20 at 18:46