引导层java.lang.module.FindException的初始化在通过Eclipse使用TestNG和Java 12执行Selenium测试期间发生错误 [英] Error occurred during initialization of boot layer java.lang.module.FindException executing Selenium tests using TestNG and Java 12 through Eclipse

查看:567
本文介绍了引导层java.lang.module.FindException的初始化在通过Eclipse使用TestNG和Java 12执行Selenium测试期间发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ErrorOccuredDuringInitializationofbootlayer 我在运行时不断收到此错误 我的测试:

ErrorOccuredDuringInitializationofbootlayer I keep getting this error when I run my test:

启动层初始化期间发生错误 java.lang.module.FindException:无法导出模块描述符 C:\ Users \ Bonfire.eclipse \ org.eclipse.platform_4.12.0_867647348_win32_win32_x86_64 \ plugins \ com.beust.jcommander_1.72.0.jar 造成原因:java.lang.IllegalArgumentException: com.beust.jcommander.1.72.0:无效的模块名称:'1'不是Java 标识符

Error occurred during initialization of boot layer java.lang.module.FindException: Unable to derive module descriptor for C:\Users\Bonfire.eclipse\org.eclipse.platform_4.12.0_867647348_win32_win32_x86_64\plugins\com.beust.jcommander_1.72.0.jar Caused by: java.lang.IllegalArgumentException: com.beust.jcommander.1.72.0: Invalid module name: '1' is not a Java identifier

我该如何解决?

推荐答案

为避免此错误,请不要在项目或src文件夹中添加TestNG库.尝试将其添加到程序包中.为此,请按照下面提到的过程进行操作.

To avoid this error, do not add TestNG library in the project or src folder. Try adding it into the package. To do so , follow the below mentioned procedure.

右键单击软件包,单击构建路径"->配置构建路径",转到库"选项卡,选择类路径",然后单击添加库"以选择TestNG.

Right click on the package, click Build Path->Configure Build Path, go to Libraries tab, select Classpath and click on Add Library to select TestNG.

这篇关于引导层java.lang.module.FindException的初始化在通过Eclipse使用TestNG和Java 12执行Selenium测试期间发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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