Java Jigsaw JUnit测试 - JUnit不在模块中 [英] Java Jigsaw JUnit Testing - JUnit not in module

查看:828
本文介绍了Java Jigsaw JUnit测试 - JUnit不在模块中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中使用 Java 9.0.4 Oxygen.3a

JUnit 5在模块路径上并且在module-info.java中是必需的。

当我尝试运行我的代码时,我总是收到以下消息:

I'm using Java 9.0.4 in Eclipse Oxygen.3a
JUnit 5 is on the modul-path and required in the module-info.java.
When I try to run my code i always get the following message:


初始化期间发生错误引导层
java.lang.module.FindException:无法为
导出模块描述符C:\ Users \Tim
HP.p2\pool\plugins\org。 junit.jupiter.migrationsupport_5.0.0.v20170910-2246.jar
引起:java.lang.module.InvalidModuleDescriptorException:Provider
class org.junit.jupiter.engine.JupiterTestEngine not in module

Error occurred during initialization of boot layer java.lang.module.FindException: Unable to derive module descriptor for C:\Users\Tim HP.p2\pool\plugins\org.junit.jupiter.migrationsupport_5.0.0.v20170910-2246.jar Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.junit.jupiter.engine.JupiterTestEngine not in module

我无法弄清楚如何解决这个问题。

I cannot really figure out how I can resolve this issue.

推荐答案

您需要升级到junit 5.0.2(或更高版本)

You need to upgrade to junit 5.0.2 (or later)

请参阅
https://bugs.eclipse.org/bugs/show_bug.cgi?id=525948#c12

https://bugs.eclipse.org/bugs/show_bug.cgi?id=525948#c19

当前Eclipse Photon里程碑构建(功能完备的)已包含JUnit 5.1。您可以从 http://download.eclipse.org/eclipse/downloads/下载4.8RC1 SDK软件包。 或其他4.8M7套餐今天晚些时候来自 https://www.eclipse。组织/下载/指数developer.php 。如果您发现错误,请通过 https://bugs.eclipse.org 报告。

The current Eclipse Photon milestone builds (which are feature-complete) already contain JUnit 5.1. You can download the 4.8RC1 SDK package from http://download.eclipse.org/eclipse/downloads/ or other 4.8M7 packages later today from https://www.eclipse.org/downloads/index-developer.php. In case you find bugs, please report them at https://bugs.eclipse.org

这篇关于Java Jigsaw JUnit测试 - JUnit不在模块中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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