Gradle 7.3和JDK 17升级后找不到模块例外

发布于 2025-02-07 06:32:06 字数 326 浏览 2 评论 0原文

我试图将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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文