Java 10 Eclipse + Maven “java.lang.module.FindException: Module myproject not found”

为君一笑 提交于 2021-02-19 06:27:04

问题


I have created a new Java 10 project in Eclipse 4.7.3a

This is a maven project with some dependencies.

The project is called "MyProject" and below is my module-info.java

module myproject {
    exports myproject;

    requires commons.logging;
    requires htmlunit;
    requires htmlunit.cssparser;
    requires java.logging;
    requires java.xml;
    requires selenium.api;
    requires selenium.firefox.driver;
    requires selenium.remote.driver;
}

when I run the project I get the following

Error occurred during initialization of boot layer
java.lang.module.FindException: Module myproject not found

What am I doing wrong here?


回答1:


The maven integration in 4.7.3a doesn't support launching modular applications (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=529398)

This has been implemented for Eclipse 4.8 (Photon) which will be released in June.

You can already use a (feature complete) milestone build from http://download.eclipse.org/eclipse/downloads/. If you find any bugs, please report them at https://bugs.eclipse.org/bugs/



来源:https://stackoverflow.com/questions/50334794/java-10-eclipse-maven-java-lang-module-findexception-module-myproject-not-fo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!