I tested Spike's and JavaLoader.CFC against java.lang.Class.forName("
dir.class.here")
and they both errored even though the classes loaded at first. It does not
seem like the classes
will be around for other classes unlike my CFC which pass the
forName("String") test.
<cfset paths[1] = expandPath("hsqldb.jar")>
<cfset loader = createObject("component", "JavaLoader").init(paths)>
<cfset HelloWorld = loader.create("org.hsqldb.WebServer")>
<cfset hello = HelloWorld.init()>
<!--- creates object of org.hsqldb.WebServer --->
<cfdump var="#hello#"> works!
<cftry>
<cfset test = createObject("java", "java.lang.Class")>
<!--- still errors --->
<cfset Workbook = test.forName("org.hsqldb.WebServer")>
<!--- still errors --->
<cfcatch type="any">
<cfdump var="#cfcatch#">
</cfcatch>
</cftry>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:247456
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4