Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Error occurred during initialization of boot layer
Error occurred during initialization of boot layer [message #1834578] Thu, 12 November 2020 11:39 Go to next message
Eclipse UserFriend
I wanted to run the Hello World code in Java, but the following error has appeared:

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

This is the code I tried to run:


public class MyClass {

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

}


My Java version is this:

javac 15.0.1.

How can I fix it?
Re: Error occurred during initialization of boot layer [message #1834588 is a reply to message #1834578] Thu, 12 November 2020 22:00 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
I believe you have a module defined here [check for a module-info.java file]. You must have got a compilation error in this case "Must declare a named package because this compilation unit is associated to the named module 'test'" as per Java Language Specification version 15, sec 7.4.2 "The host system must associate ordinary compilation units in an unnamed package with an unnamed module (§7.7.5), not a named module." Trying to run this program should have resulted in this error.

So either (1) remove this module-info.java file if you don't want your project associated with a module or (2) create a package, say pack1 and move this class into that and compile

package pack1;
public class MyClass {

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

}

Regards,
Manoj
Re: Error occurred during initialization of boot layer [message #1838802 is a reply to message #1834588] Fri, 05 March 2021 04:28 Go to previous messageGo to next message
Eclipse UserFriend
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for C:\Users\zoheth\eclipse-workspace\Beat\lib\rs2xml.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: JDOMAbout$Author.class found in top-level directory (unnamed package not allowed in module)


how to remove this error?
  • Attachment: Capture13.PNG
    (Size: 19.13KB, Downloaded 2145 times)
Re: Error occurred during initialization of boot layer [message #1850720 is a reply to message #1838802] Tue, 15 March 2022 08:13 Go to previous message
Eclipse UserFriend
Hi there,

I'm getting also same error.

Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for E:\Software\client-standalone.jar\client-standalone.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.apache.xpath.jaxp.XPathFactoryImpl not in module

  • Attachment: error.PNG
    (Size: 110.61KB, Downloaded 1167 times)
Previous Topic:Reuse JDT's inline feature
Next Topic:Installation error
Goto Forum:
  


Current Time: Mon Jul 07 15:29:11 EDT 2025

Powered by FUDForum. Page generated in 0.03945 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top