Creating QR Code with Coldfusion(使用 Coldfusion 创建 QR 码)
问题描述
有没有人获得开源二维码库"来使用 ColdFusion?我需要在 ColdFusion 中生成二维码.
Has anyone gotten the "Open Source QR Code Library" to work with ColdFusion? I need to generate QR Codes in ColdFusion.
我还发现 本教程如何使用 Zxing 生成它.
I also found this tutorial on how to generate it using Zxing.
但是教程并不清楚如何配置文件,例如需要在哪个目录中...
But the tutorial is not clear on how to configure the files, e.g. what needs to be in which dir...
欢迎任何帮助和替代方法,谢谢.
Any help and alternatives are welcomed, thanks.
推荐答案
Zxing 使用两 (2) 个 jar:core.jar 和 javase.jar.安装它们的最简单方法是将两个 jar 放在 CF 类路径中的任何位置(例如:C:ColdFusion8wwwrootweb-inflib).然后重新启动 CF 服务器.这就对了.
Zxing uses two (2) jars: core.jar and javase.jar. The easiest way to install them is to place both jars anywhere in the CF classpath (example: C:ColdFusion8wwwrootweb-inflib). Then restart the CF server. That is it.
注意:您可以自己编译 zxing jar,也可以从 blog.getRailo.com) 更新: barcode_samples.zip 文件确实包含示例 CF 代码.但它只适用于Railo.Adobe CF 不支持 createObject("java") 的额外参数.要在 Adobe CF 中使用代码,您需要删除额外的参数.
Note: You can either compile the zxing jars yourself or download a slightly older version from this handy entry on blog.getRailo.com) Update: The barcode_samples.zip file does contain sample CF code. But it is for Railo only. Adobe CF does not support the extra parameters for createObject("java"). To use the code in Adobe CF, you need to remove the extra parameters.
<!--- Railo syntax --->
<cfset object = createObject('java','path.to.classtoinvoke','/path/to/jar/file/on/system')>
<!--- Adobe CF --->
<cfset object = createObject('java','path.to.classtoinvoke')>
如果您无权访问类路径,则可以使用 JavaLoader.cfc 来加载两 (2) 个 zxing 罐子.只需下载该项目.它包括一些关于安装和使用的很好的例子.但如果您还有其他问题,请告诉我.
If you do not have access to the classpath, you can use the JavaLoader.cfc to load the two (2) zxing jars instead. Just download the project. It includes some pretty good examples on installation and usage. But if you have further questions, let me know.
这篇关于使用 Coldfusion 创建 QR 码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 Coldfusion 创建 QR 码
基础教程推荐
- JPA惰性列表上的流 2022-01-01
- doFilter()是在servlet的工作完成之前还是之后执行的? 2022-01-01
- Maven:无效的目标版本:10 2022-01-01
- 将 double 转换为 Int,向下舍入 2022-01-01
- 将 Windows 证书导入 Java 2022-01-01
- 在springboot中如何给mybatis加拦截器 2023-04-29
- 如何在相机中应用自定义滤镜 [Surfaceview 预览]. 2022-01-01
- 在java中使用xpath和selenium解析HTML表格数据 2022-01-01
- Java ECDSAwithSHA256 签名长度不一致 2022-01-01
- 控制台应用程序中的 Java 键盘输入解析 2022-01-01
