Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

calling user defined java class within cfml

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,

like image 693
Komal Avatar asked Feb 24 '23 18:02

Komal


1 Answers

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.

like image 137
Lucas Avatar answered Mar 03 '23 14:03

Lucas