如何 IKVM Apache POI [英] How to IKVM Apache POI

查看:34
本文介绍了如何 IKVM Apache POI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的 .NET 应用程序中使用 Apache POI,我知道有一个端口 NPOI 但它不完整并且没有 PowerPoint 相关功能.

I want to use Apache POI in my .NET application, I know there is a port NPOI but it's not complete and don't have PowerPoint related functionality.

我尝试使用以下命令对其进行 IKVM:

I've tried to IKVM it by using the following command:

ikvmc -target:library poi-3.8.jar poi-ooxml-3.8.jar poi-ooxml-schemas-3.8.jar poi-excelant-3.8.jar poi-scratchpad-3.8.jar

但是在使用生成的 dll 中的类之后,我执行了应用程序,出现了这个错误:

but when after using the classes in resulting dll I've executed the application, got this error:

The type initializer for 'org.apache.poi.xslf.usermodel.XMLSlideShow' threw an exception.

有人可以将我指向可以下载 IKVMed Apache POI 的链接吗?谷歌搜索了它,但目前运气不佳.

can someone direct me to the link where I can download IKVMed Apache POI, Googled it but didn't have much luck as of now.

推荐答案

我刚刚完成了使用 IKVM 成功转换 POI 3.9 的项目.

I just finished the project where I have successfully converted POI 3.9 using IKVM.

先决条件:

  • 下载 POI 3.9 并将所有 JAR 文件复制到一个目录中
  • 下载 IKVM(我使用的是 0.46.0.1 版)

以下命令(在所有 POI JAR 所在的同一目录中的 Windows 7 命令行中运行)对我有用:

The following commands (run in Windows 7 command line in the same directory where all the POI JARs are) did the trick for me:

ikvmc -target:library xmlbeans-2.3.0.jar
ikvmc -target:library stax-api-1.0.1.jar

ikvmc poi-ooxml-schemas-3.9-20121203.jar -target:library -reference:xmlbeans-2.3.0.dll -reference:stax-api-1.0.1.dll 


ikvmc -target:library log4j-1.2.13.jar
ikvmc -target:library commons-logging-1.1.jar
ikvmc -target:library commons-codec-1.5.jar

ikvmc poi-3.9-20121203.jar -target:library -reference:log4j-1.2.13.dll -reference:commons-logging-1.1.dll -reference:commons-codec-1.5.dll

ikvmc -target:library dom4j-1.6.1.jar

ikvmc poi-ooxml-3.9-20121203.jar -target:library -reference:poi-3.9-20121203.dll -reference:poi-ooxml-schemas-3.9-20121203.dll -reference:dom4j-1.6.1.dll -reference:xmlbeans-2.3.0.dll

希望有帮助.

这篇关于如何 IKVM Apache POI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆