在 ColdFusion 10 中使用更新版本的 Apache POI [英] Using a newer version of Apache POI in ColdFusion 10

查看:33
本文介绍了在 ColdFusion 10 中使用更新版本的 Apache POI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 ColdFusion 10 中使用更新版本的 Apache POI,因为我需要访问一些更新的功能.

I would like to use newer version of Apache POI with ColdFusion 10 than the one with which it ships, as I need to access some of the newer functionality.

我曾尝试将 ColdFusion 的 Apache POI JAR 文件替换为较新版本,但这会导致某些内置的 ColdFusion 电子表格功能中断.

I have tried swapping ColdFusion's Apache POI JAR files for the newer versions but this causes some of the built in ColdFusion spreadsheet functionality to break.

是否可以加载新版本以在我的代码中使用,但保持 ColdFusion 的版本不变,以便内置电子表格功能仍然有效?

Is it possible to load in the newer version for use in my code but leave ColdFusion's version untouched so that the built in spreadsheet functionality still works?

我知道可以指定自定义 JavaCF10 中的加载路径,但如果我尝试加载已加载以供 ColdFusion 使用的库的较新版本,这会导致冲突吗?

I know it is possible to specify a custom Java load path in CF10 but if I try and load in a newer version of a library which has already been loaded for use by ColdFusion will this cause a clash?

推荐答案

可以使用 Mark Mandel 的 JavaLoader (https://github.com/markmandel/JavaLoader) 将更新版本的 Apache POI 与 ColdFusion 10 结合使用,而不会影响 CF 的内置电子表格功能.

It is possible to use Mark Mandel's JavaLoader (https://github.com/markmandel/JavaLoader) to use a newer version of Apache POI with ColdFusion 10 without affecting CF's built in spreadsheet functionality.

我使用了 Apache POI 的 3.11-beta2 版本,因为这不依赖于似乎有问题的 dom4j.jar.

I used version 3.11-beta2 of Apache POI because this does not depend on dom4j.jar which seems to be problematic.

我使用 JavaLoader 而不是 CF10 的内置功能来加载 JAR,因为这允许我使用 createObject() 访问 ColdFusion 的旧版本 Apache POI,同时使用JavaLoader 方法 server[application.JavaLoader].create().

I used JavaLoader instead of CF10's built-in ability to load JARs because this allows me to access ColdFusion's older version of Apache POI using createObject() whilst accessing the newer version stored in my webroot using the JavaLoader method server[application.JavaLoader].create().

这篇关于在 ColdFusion 10 中使用更新版本的 Apache POI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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