如何为 ColdFusion 10 安装自定义 Java 类

时间:2023-01-15
本文介绍了如何为 ColdFusion 10 安装自定义 Java 类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们刚刚在一些新服务器上部署了 CF 10.

We have just deployed CF 10 onto some new servers.

我正在尝试 遵循这个过程,我们在 CF8 上没有任何问题.但是我不确定 CF10 的结构如何.

I'm trying to follow this process, which we had working without any issues on CF8. However I'm not sure how things are structured in CF10.

我们在 CF 10 中的目录路径显示为:

Our directory path in CF 10 appears as:

Coldfusion10
   cfusion
   jre
   ininstall

是否所有额外的 Java 类都安装到 jre 中?

Do all the additional Java classes get installed into jre?

推荐答案

CF10 的唯一区别是 {install root} 和 {web root} 之间多了一个目录层.即

The only difference in CF10 is there is an extra directory layer between the {install root} and {web root}. ie

          coldfusion8wwwroot
          coldfusion10cfusionwwwroot 

但是,它不会改变 the关于类加载.jar 可以放在任何地方,只要它们可以被 CF 服务访问,并且目录在 CF 类路径中,或者默认的 jvm 类路径中.

However, it does not change the rules about class loading. Jars can be placed anywhere, as long as they are accessible to the CF service, and the directory is in CF class path, or the default jvm class path.

CF 自动检查的默认类路径中有几个目录,例如 {cf_webroot}web-inflib.最简单的选择是将它们放在该目录中.然后 CF 会自动拾取它们,无需使用类路径设置.只需将您的 jar 放到该文件夹​​中,重新启动 CF 服务,您就可以开始了.

There are several directories in the default class path that CF checks automatically, such as {cf_webroot}web-inflib. The simplest option is to place them in that directory. Then CF will pick them up automatically, no need to muck with the class path settings. Just drop your jars in that folder, restart the CF service, and you are good to go.

这篇关于如何为 ColdFusion 10 安装自定义 Java 类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

上一篇:使用 CFEclipse 在 ColdFusion 11 中进行线路调试 下一篇:为什么在 ColdFusion 中 0.06 + 0.01 = 0.07?

相关文章

最新文章