本文介绍了apache POI 用于读写excel 或xls 的jar 依赖项是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于缺少 xmlbeans.jar 依赖项,我正在运行时出现错误,例如 java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject.我需要使用 XLS、DOC 和 .PPT 格式.有人可以为 apache POI 推荐重要的 JAR 吗?

i am getting runtime with error like java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject because of missing xmlbeans.jar dependency.i need to work with XLS, DOC and .PPT formats.Can somebody suggest the important JARs for the apache POI?

推荐答案

Apache POI 的依赖项是 在此处的 Apache POI 网站上进行了完整描述.

The dependencies of Apache POI are fully described on the Apache POI website here.

那个表(我不会在这里复制,因为你会想检查最新版本在 POI 网站上) 详细信息,对于您要使用的每个组件,依赖项是什么.

That table (which I won't reproduce here as you'll want to check the latest version on the POI website) details, for each component you want to use, what the dependencies are.

如果您下载最新的 Apache POI 二进制版本(.tar.gz.zip),您会发现其中包含您需要的所有依赖 jar.查看组件和依赖项页面,了解您需要使用哪些组件和依赖项.

If you download the latest Apache POI binary release (.tar.gz or .zip), you'll find all the dependency jars you need contained within that. Check the components and dependencies page to see which ones you'll need for your use.

或者,手动处理依赖关系是 1990 年代的事情.您最好使用 Gradle 或 Apache Maven 等工具为您处理它,然后他们会选择项目提供的元数据来获取您需要的依赖项.

Alternately, manually handling dependencies is rather 1990s. You'd be much better off using a tool like Gradle or Apache Maven to handle it for you, then they'll pick up the project-supplied metadata to grab the dependencies you need.

Apache POI 的 Maven/Gradle 工件的详细信息也在 POI 的 组件页面上提供网站

Detail of the Maven / Gradle artifacts for Apache POI are also given on the Components page on the POI website

这篇关于apache POI 用于读写excel 或xls 的jar 依赖项是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 21:43