Error occurred during initialization of boot layer java.lang.module.FindException executing Selenium tests using TestNG and Java 12 through Eclipse

后端 未结 3 777
逝去的感伤
逝去的感伤 2021-01-28 06:12

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

Error occurred during initialization of boot layer java.lang

3条回答
  •  悲哀的现实
    2021-01-28 06:13

    This error message...

    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
    

    ...implies that there was an issue with the java classpath.

    As per the discussion Launch with java 11 fails: Error: Could not find or load main class with Caused by: java.lang.ClassNotFoundException: with there are some issues with some particular classpaths for java-11 and the launch fails if:

    • The classpath contains a folder with spaces
    • The classpath length is larger than 32767 characters.

    Where as java-8 works fine.


    Reference

    Unable to import org.openqa.selenium.WebDriver using Selenium and Java 11


    Outro

    Eclipse plugin: TestNG testcase does not run with Jdk11

提交回复
热议问题