Java Jigsaw JUnit Testing - JUnit not in module

这一生的挚爱 提交于 2019-12-11 10:31:39

问题


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:

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.


回答1:


You need to upgrade to junit 5.0.2 (or later)

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

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



来源:https://stackoverflow.com/questions/50408189/java-jigsaw-junit-testing-junit-not-in-module

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