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
这个问题其实很简单,在添加.jar的时候添加不正确
正确的方法是:
- 在Eclipse工程src文件夹中创建一个文件夹,任意名命,如jar
- 将.jar文件拖到文件夹中
- 选中.jar文件,右键,点击Build Path=>Add to build path
- 然后就完成了
- 可以看到,多了一个Referenced Libraries
- 而原来的jar文件夹空了,添加成功
再运行程序,就不会报错了
上一篇: 气象要素空间插值分析
下一篇: 启动tomcat,报错 Error occurred during initialization of VM Could not reserve enough space for object
推荐阅读
-
Java JLayer报错Error occurred during initialization of boot...
-
启动tomcat,报错 Error occurred during initialization of VM Could not reserve enough space for object
-
Error occurred during initialization of boot layer | java.lang.module.ResolutionException:
-
Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object
-
Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object
-
IDEA打不开,点击idea.bat报错Error occurred during initialization of VM