-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在Java17 模块项目使用出现的问题 #245
Comments
This issue isn't related to fastexcel's compatibility with JDK17. |
项目是一个小工具很小并没有使用很多依赖。 module-info.java文件
|
Could you provide a minimal reproducible demo?
Ximeng0918 ***@***.***> 于2025年3月2日周日 23:07写道:
… This issue isn't related to fastexcel's compatibility with JDK17. IMO, the
problem stems from using different versions of poi dependencies in the
project, which is leading to jar conflicts and resulting errors.
项目是一个小工具很小并没有使用很多依赖。
依赖列表:
javafx-controls:17.0.6
javafx-fxml:17.0.6
lombok:1.18.36
fastexcel:1.1.0
druid:1.2.24
module-info.java文件
module com.abc.tool {
requires javafx.controls;
requires javafx.fxml;
requires static lombok;
requires fastexcel.core;
requires druid;
requires java.sql;
requires org.apache.poi.ooxml; // 不加这个 运行没有问题
opens com.abc.tool.util;
opens com.abc.tool.model;
opens com.abc.tool.views to javafx.fxml;
exports com.abc.tool;
}
—
Reply to this email directly, view it on GitHub
<#245 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRXFDSOWQOSE5CT5QFIATT2SMNDXAVCNFSM6AAAAABYE5ICPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSG43TGNBQG4>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
[image: Ximeng0918]*Ximeng0918* left a comment (fast-excel/fastexcel#245)
<#245 (comment)>
This issue isn't related to fastexcel's compatibility with JDK17. IMO, the
problem stems from using different versions of poi dependencies in the
project, which is leading to jar conflicts and resulting errors.
项目是一个小工具很小并没有使用很多依赖。
依赖列表:
javafx-controls:17.0.6
javafx-fxml:17.0.6
lombok:1.18.36
fastexcel:1.1.0
druid:1.2.24
module-info.java文件
module com.abc.tool {
requires javafx.controls;
requires javafx.fxml;
requires static lombok;
requires fastexcel.core;
requires druid;
requires java.sql;
requires org.apache.poi.ooxml; // 不加这个 运行没有问题
opens com.abc.tool.util;
opens com.abc.tool.model;
opens com.abc.tool.views to javafx.fxml;
exports com.abc.tool;
}
—
Reply to this email directly, view it on GitHub
<#245 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRXFDSOWQOSE5CT5QFIATT2SMNDXAVCNFSM6AAAAABYE5ICPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSG43TGNBQG4>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
|
Your demo cannot run successfully. error log
```log
java: java.lang.NoSuchFieldError: Class
com.sun.tools.javac.tree.JCTree$JCImport does not have member field
'com.sun.tools.javac.tree.JCTree qualid'
```
Ximeng0918 ***@***.***> 于2025年3月3日周一 23:13写道:
… Could you provide a minimal reproducible demo?
Ximeng0918 *@*.***> 于2025年3月2日周日 23:07写道:
… <#m_-5247434557022552676_>
https://github.com/liu-demo/fast-excel-demo.git
—
Reply to this email directly, view it on GitHub
<#245 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRXFDUQIETDNLNDV675FID2SRWSPAVCNFSM6AAAAABYE5ICPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJUG4ZDGOJSGM>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
[image: Ximeng0918]*Ximeng0918* left a comment (fast-excel/fastexcel#245)
<#245 (comment)>
Could you provide a minimal reproducible demo?
Ximeng0918 *@*.***> 于2025年3月2日周日 23:07写道:
… <#m_-5247434557022552676_>
https://github.com/liu-demo/fast-excel-demo.git
—
Reply to this email directly, view it on GitHub
<#245 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRXFDUQIETDNLNDV675FID2SRWSPAVCNFSM6AAAAABYE5ICPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJUG4ZDGOJSGM>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
项目的JDK使用的 Java17 |
IMO, the issue stems from the Java Module System's access restrictions. To be precise, the |
当在Java17 模块项目使用的时候,因需要使用POI的功能,所以显示显式声明 requires org.apache.poi.ooxml;
显式声明后执行就会报如下错误
java.lang.NoClassDefFoundError: Could not initialize class cn.idev.excel.write.handler.DefaultWriteHandlerLoader
The text was updated successfully, but these errors were encountered: