我需要在cfml页面中使用我自己的java类.
文档中的这个条目听起来不错,但没有解释我必须创建哪些文件.
我试图test.cfm在我的网站根目录下创建一个页面.然后将TestClass.java+ TestClass.class放在同一条路径中.但这会导致错误"找不到课程"!
你能帮我么?
我有一些代码可以在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) 我必须把我的Java库放在Coldfusion中,而我的Coldfusion Java Virtual Machine Path就是C:/ColdFusion9/runtime/jre
在哪个位置我应该考虑放置我的Java库?
Coldfusion9/wwwroot文件/ WEB-INF/lib目录
Coldfusion9 /运行/ JRE/lib目录
我可以在上述两个位置看到.jar文件.因此,我想知道我应该在哪里下载.jar?执行此操作后,我将重新启动CF9.
更多信息:这里的文档说它应该始终作为规则在JVM的类路径中.谁能告诉我规则在哪里或什么?