Error occurred during initialization of boot layer FindException: Module not found

We Are Going To Discuss About Error occurred during initialization of boot layer FindException: Module not found. So lets Start this Java Article.

Error occurred during initialization of boot layer FindException: Module not found

  1. Error occurred during initialization of boot layer FindException: Module not found

    The reason behind this is that meanwhile creating your own class, you had also accepted to create a default class as prescribed by your IDE and after writing your code in your own class, you are getting such an error. In order to eliminate this, go to the PROJECT folder → src → Default package. Keep only one class (in which you had written code) and delete others.

  2. Error occurred during initialization of boot layer FindException: Module not found

    The reason behind this is that meanwhile creating your own class, you had also accepted to create a default class as prescribed by your IDE and after writing your code in your own class, you are getting such an error. In order to eliminate this, go to the PROJECT folder → src → Default package. Keep only one class (in which you had written code) and delete others.

Solution 1

The reason behind this is that meanwhile creating your own class, you had also accepted to create a default class as prescribed by your IDE and after writing your code in your own class, you are getting such an error. In order to eliminate this, go to the PROJECT folder → src → Default package. Keep only one class (in which you had written code) and delete others.

After that, run your program and it will definitely run without any error.

Original Author Rahat Rajdev Of This Content

Solution 2

I had the same issue while executing my selenium tests and I removed the selenium dependencies from the ModulePath to ClassPath under Build path in eclipse and it worked!

Original Author Ankur Of This Content

Solution 3

I had similar issue, the problem I faced was I added the selenium-server-standalone-3.141.59.jar under modulepath instead it should be under classpath

so select classpath via (project -> Properties -> Java Bbuild Path -> Libraries)
add the downloaded latest jar

After adding it must be something like this

enter image description here

And appropriate driver for browser has to be downloaded for me i checked and downloaded the same version of chrom for chrome driver and added in the C:\Program Files\Java

And following is the code that worked fine for me

public class TestuiAautomation {

    public static void main(String[] args) {

        System.out.println("Jai Ganesha");
        try {
            System.setProperty("webdriver.chrome.driver", "C:\\Program Files\\Java\\chromedriver.exe");
            System.out.println(System.getProperty("webdriver.chrome.driver"));
            ChromeOptions chromeOptions = new ChromeOptions();
            chromeOptions.addArguments("no-sandbox");
            chromeOptions.addArguments("--test-type");
            chromeOptions.addArguments("disable-extensions");
            chromeOptions.addArguments("--start-maximized");
            WebDriver driver = new ChromeDriver(chromeOptions);
            driver.get("https://www.google.com");
            System.out.println("Google is selected");
        } catch (Exception e) {
            System.err.println(e);
        }

    }
}

Original Author Parameshwar Of This Content

Solution 4

You say that your module-info.java contains

module myModule {}

That means it declares a module called myModule, not com.pantech.myModule. Pointing this from the command format:

 -m <module-name>/<main-class>

Original Author tretegfdg Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment