Assuming JAVA object creation hasn't been locked out, here is
a scripted method for a cfx install.
The example below is an install of the nslookup.dll located
in the same directory as the installation template
<cfobject action="CREATE"
type="JAVA"
class="coldfusion.server.ServiceFactory"
name="factory">
<cfset request.runtime = factory.getRuntimeService()>
<cfscript>
tagname = "CFX_NSLookup";
if ( structKeyExists(request.runtime.cfxtags, tagname) )
{
//delete the tag name, so when we add a new one it will
trigger store()
//(adding and removing are the only things that triger the
store() method.)
StructDelete( request.runtime.cfxtags, tagname);
}
// CPP for dll
// or JAVA
stCFXs = structNew();
stCFXs[tagname] = StructNew();
stCFXs[tagname].name = tagname;
stCFXs[tagname].type = "CPP";
stCFXs[tagname].description = "Provides NSLookup by TCP/IP,
used by application for logging.";
stCFXs[tagname].cache = false;
stCFXs[tagname].procedure = "ProcessTagRequest";
stCFXs[tagname].library = "#expandPath('.')#\nslookup.dll";
// store this tag
request.runtime.cfxtags[tagname] = stCFXs[tagname];
</cfscript>