IIRC, Java will search class paths in order and uses the first match it finds.  
So, I'm thinking since CF starts up, loads the built-in POI jars, then 
eventually sees your app and loads the Jars again, albeit newer versions, then 
this new version is lower in the 'order'   The disclaimer here is that I'm not 
a JAR head by trade :)  I think you could add the Jar in the CFAdmin tool, 
restart CF, then check the JVM details and see if your JAR is higher in the 
order, it should be.  Might need to add this JAR in the jam.config manually 
though.  (I left that typo in, SpaceBalls! )  ok, jvm.config.   EIther of these 
might affect the CF tags using POI though.  

A classic post on adding Jars is below, though I'd start with 
http://carehart.org/cf411/ first :)
http://blogs.adobe.com/cantrell/archives/2004/07/the_definitive.html


HTH

Douglas Knudsen
douglasknud...@gmail.com



On Sep 20, 2012, at 7:11 PM, Mike Staver <sta...@fimble.com> wrote:

> I can't find any good documentation from Adobe yet on how to dynamically load 
> and then use jar files. I previously used JavaLoader, and after fixing the 
> class load issues I had in code, it worked flawlessly for the past few years. 
> I was using it to load newer versions of POI for excel manipulation, etc. I 
> see now that Adobe has built this into CF, and they have some docs that point 
> to using it like this:
> 
> <cfset THIS.javaSettings = {LoadPaths = [".\javalib\"], 
> loadColdFusionClassPath = true, reloadOnChange = true,watchInterval=30}>
> 
> What they don't cover is how to create objects from these jar files and use 
> them in code. I found an example here:
> 
> http://www.isummation.com/blog/day-8-coldfusion-10-and-enhanced-java-integration/
> 
> I'm recursively loading POI 3.8 and all it's included jar files using the 
> example above. That doesn't throw any errors or give me any indication that 
> they aren't loaded. I'm doing this in onApplicationStart(). My next challenge 
> is to figure out how to actually reference this new POI version. I assume I 
> would load POI something like this from the URL I included above:
> 
> <cfobject type="java" class="poi" name="myObj"> 
> 
> My question is - how do I reference "my" version of POI, rather than the 
> build in Adobe one which is a bit older than I need?
> 
> ------------------------------------------------------------- 
> To unsubscribe from this list, manage your profile @ 
> http://www.acfug.org?fa=login.edituserform 
> 
> For more info, see http://www.acfug.org/mailinglists 
> Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
> List hosted by FusionLink 
> -------------------------------------------------------------




-------------------------------------------------------------

To unsubscribe from this list, manage your profile @ 

http://www.acfug.org?fa=login.edituserform



For more info, see http://www.acfug.org/mailinglists

Archive @ http://www.mail-archive.com/discussion%40acfug.org/

List hosted by http://www.fusionlink.com

-------------------------------------------------------------


Reply via email to