Loading objects from java jar files


#1

I’m trying to load an object from an included jar file. I see that the common advice is to put custom jars into lucee/lib, however these are located in the standard WEB-INF/lib path. It looks like I should specify that to the loader by setting this.javaSettings = {loadPaths = ["WEB-INF/lib"],reloadOnChange=true}; in my Application.cfc, but it doesn’t seem to work (or at least the object is not available onSessionStart). Could someone tell me what the correct relative path would be?

Also, even after setting the javaSettings.loadPaths property, I don’t see the value reported when I run <cfdump var="#getApplicationMetaData()#"/>. Shouldn’t that be listed?


#2

Well, I think I partly figured it out. Since the web-inf file is at the root, begin there. this.javaSettings = {LoadPaths = ["/WEB-INF/lib"], reloadOnChange = true};