Java 10 Eclipse + Maven"java.lang.module.FindException:找不到模块myproject". [英] Java 10 Eclipse + Maven "java.lang.module.FindException: Module myproject not found"

查看:96
本文介绍了Java 10 Eclipse + Maven"java.lang.module.FindException:找不到模块myproject".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Eclipse 4.7.3a中创建了一个新的Java 10项目

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

这是一个带有某些依赖项的Maven项目.

This is a maven project with some dependencies.

该项目称为"MyProject",下面是我的module-info.java

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

我在做什么错了?

推荐答案

4.7.3a中的Maven集成不支持启动模块化应用程序(请参见

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

已针对将于6月发布的Eclipse 4.8(Photon)实现了此功能.

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

您已经可以使用 http://download.eclipse的(功能完整的)里程碑构建.org/eclipse/downloads/.如果发现任何错误,请在 https://bugs.eclipse.org/bugs/

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/

这篇关于Java 10 Eclipse + Maven"java.lang.module.FindException:找不到模块myproject".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆