New Feature of Coldfusion 10 Allows You to Dynamically Load Java Libraries

Coldfusion 10

In the old days of ColdFusion if you wanted to access a 3rd party Java library (JAR or class files) you had a couple options:

1. Add the location of the library to the ColdFusion classpath
22. Use something like JavaLoader ( to dynamically load Java libraries into your ColdFusion application.

ColdFusion 10, however, makes it even easier to load Java libraries into your ColdFusion application without having to restart ColdFusion. All that’s required is your application define the ‘THIS.javaSettings’ attribute within the site’s Application.cfc like below:

<cfset THIS.javaSettings = {LoadPaths = [“/javafiles/”],reloadOnChange=true,watchInterval=30}/>

The above code will check the “javafiles” directory in your Web root for ‘jar’ and ‘class’ files and make any libraries within the directory accessible from your ColdFusion application. ColdFusion will also check for changes to the files every 30 seconds and reload the libraries if it notices any changes to the files.

More info:

Adobe ColdFusion 10 Documentation – Using Java Classes: