Neo*_*nig 6 coldfusion railo cfwheels coldfusion-10
我有一些代码可以在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 library
8 : application.bCrypt = CreateObject( "java", "BCrypt", "/miscellaneous/" );
9 :
10 : // Application Specific settings
Run Code Online (Sandbox Code Playgroud)
我认为这只是一种语法问题?我可以在CF10/11上以这种方式调用.class文件吗?
啊,谢谢大家.正如haxtbh 在评论中所说,问题是
Adobe CF的createObject只有两个参数.类型和类.
所以我需要把:
this.javaSettings = { LoadPaths = ["/miscellaneous"] };
在/config/app.cfm中
然后使用
CreateObject( "java", "BCrypt" );
在/events/onapplicationstart.cfm中
归档时间: |
|
查看次数: |
516 次 |
最近记录: |