刚开始试了两个包都加module-info.calss发现不行,模块A无法读取到模块B的module-info.calss
报错如下:because module pdfbox does not read module commons.logging
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
module pdfbox {
requires java.base;
requires java.desktop;
requires java.xml;
requires java.logging;
exports org.apache.pdfbox.pdmodel;
}
最简单粗暴的方法,将两个jar包合并成一个
A需要B就把需要B目录及其内容放在A下
如图,我是讲commons-logging放到了此目录下,完美解决问题。