欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Java JLayer报错Error occurred during initialization of boot...

程序员文章站 2022-07-14 10:33:33
...

Java JLayer报错

用Java JLayer时报错了…

Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for X:\XXXXXXXXX\XXXXXXXXXXX\src\jar\jl1.0.1.jar
Caused by: java.lang.IllegalArgumentException: jl1.0.1: Invalid module name: '0' is not a Java identifier

Java JLayer报错Error occurred during initialization of boot...

这个问题其实很简单,在添加.jar的时候添加不正确
正确的方法是:

  1. 在Eclipse工程src文件夹中创建一个文件夹,任意名命,如jar
  2. 将.jar文件拖到文件夹中
  3. 选中.jar文件,右键,点击Build Path=>Add to build path
  4. 然后就完成了 Java JLayer报错Error occurred during initialization of boot...
  5. 可以看到,多了一个Referenced Libraries Java JLayer报错Error occurred during initialization of boot...
  6. 而原来的jar文件夹空了,添加成功

再运行程序,就不会报错了

相关标签: Java