Reputation: 63
How do i call a jar file provided using CFML?
I tried using createObject() method but I am confused about the path.
Is it the class path or jar file path?
Where I have to place the .jar file?
Do I need to load the .jar file on Blue Dragon server?
Thanks,
Upvotes: 4
Views: 678
Reputation: 2019
I suggest http://javaloader.riaforge.org/ for loading java object. It gives lots of flexibility like you do not need to store your class file in web-inf or doesn't need to map directory.
Upvotes: 4
Reputation: 1402
In order to use custom jar files you need to copy them into specific directory in ColdFusion - a classpath. It depends on the setup but usually it's located here:
#server.ColdFusion.ROOTDIR#\lib\
Then you need to restart the CF server.
Here's some guide on doing it: http://blogs.adobe.com/cantrell/archives/2004/07/the_definitive.html
If you're planning on using more jar files it could be usefull to use some library like JavaLoader - then you can load any jar withouth the need of restarting CF.
Upvotes: 4