Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16:39 Go to next message
Andreea Predi is currently offline Andreea PrediFriend
Messages: 1
Registered: November 2020
Junior Member
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] Fri, 13 November 2020 03:00 Go to previous messageGo to next message
Manoj N Palat is currently offline Manoj N PalatFriend
Messages: 19
Registered: October 2014
Junior Member
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


Manoj N Palat
Eclipse Java Development Tools (JDT).
Re: Error occurred during initialization of boot layer [message #1838802 is a reply to message #1834588] Fri, 05 March 2021 09:28 Go to previous messageGo to next message
Zoheth  George is currently offline Zoheth GeorgeFriend
Messages: 1
Registered: March 2021
Junior Member
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 1929 times)
Re: Error occurred during initialization of boot layer [message #1850720 is a reply to message #1838802] Tue, 15 March 2022 12:13 Go to previous message
Kamal Patidar is currently offline Kamal PatidarFriend
Messages: 1
Registered: March 2022
Junior Member
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 860 times)
Previous Topic:Reuse JDT's inline feature
Next Topic:Installation error
Goto Forum:
  


Current Time: Thu Apr 25 23:59:47 GMT 2024

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

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

Back to the top