相关疑难解决方法(0)

ColdFusion:关于使用自定义"自己编写的"Java类

我需要在cfml页面中使用我自己的java类.

文档中的这个条目听起来不错,但没有解释我必须创建哪些文件.

我试图test.cfm在我的网站根目录下创建一个页面.然后将TestClass.java+ TestClass.class放在同一条路径中.但这会导致错误"找不到课程"!

你能帮我么?

java coldfusion class classpath coldfusion-10

7
推荐指数
1
解决办法
2333
查看次数

在ColdFusion11中使用java类 - CreateObject函数的java对象类型是未知的

我有一些代码可以在Railo下运行,但我正试图让这个特定的应用程序在CF10和CF11上工作

这是一个cfWheels应用程序,我BCrypt.class/miscellaneous/目录中有一个文件.

在我的/events/onapplicationstart.cfm档案中,我有:

application.bCrypt = CreateObject( "java", "BCrypt", "/miscellaneous/" );
Run Code Online (Sandbox Code Playgroud)

这适用于Railo; 但在CF11中我得到了

The java object type is unknown for the CreateObject function.

Verify the type of your object when creating it and try again. 
Valid Types are : component | java | webservice | dotnet | com | corba | .NET


The error occurred in /Volumes/Documents/blah/public/events/onapplicationstart.cfm: line 8
Called from /Volumes/Documents/blah/public/wheels/global/cfml.cfm: line 111
Called from /Volumes/Documents/blah/public/wheels/events/onapplicationstart.cfm: line 388
6 : 
7 :     // BCrypt …
Run Code Online (Sandbox Code Playgroud)

coldfusion railo cfwheels coldfusion-10

6
推荐指数
1
解决办法
516
查看次数

将Java库放在ColdFusion中的哪个位置?

我必须把我的Java库放在Coldfusion中,而我的Coldfusion Java Virtual Machine Path就是C:/ColdFusion9/runtime/jre

在哪个位置我应该考虑放置我的Java库?

  1. Coldfusion9/wwwroot文件/ WEB-INF/lib目录

  2. Coldfusion9 /运行/ JRE/lib目录

我可以在上述两个位置看到.jar文件.因此,我想知道我应该在哪里下载.jar?执行此操作后,我将重新启动CF9.

更多信息:这里的文档说它应该始终作为规则在JVM的类路径中.谁能告诉我规则在哪里或什么?

coldfusion coldfusion-9

1
推荐指数
1
解决办法
1318
查看次数