Gradle 7.3和JDK 17升级后找不到模块例外
我试图将Java多模块项目升级到OpenJDK 17,这迫使我将Gradle版本从6.8升级到7.3。在更改build.gradle文件之后,现在构建成功了。但是,当我启动应用程序时,我会得到以下例外。
引导层初始化时发生了错误 java.lang.module.findexception:未找到模块“ foo”,“ goo”要求。
此外,未找到的模块正在为未在模块路径中添加的罐子投掷。
将罐子复制到libs文件夹中,并在build.gralde
中添加以下命令实施Filetree(包括:['*.jar'],dir:'libs')
I was trying to upgrade Java multi-module project to OpenJDK 17, which forced me to upgrade Gradle version from 6.8 to 7.3. After making the changes in build.gradle file, now the build is successful. But when I start the application I am getting the following exception.
Error occurred during initialization of boot layer
java.lang.module.FindException: Module "foo" not found, required by "goo".
Also the module not found exception are throwing for the JARs which are not added in module path.
The jars are copied to libs folder and added the following command in build.gralde
implementation fileTree(include: ['*.jar'], dir: 'libs')
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论