Just make sure the jar is specifed in the classpath, (stick it in \lib ) and
just use it...

<cfobject type="java" name="objImagePlus" class="ij.ImagePlus"
action="create">
<cfobject type="java" name="objOpener" class="ij.io.Opener" action="create">

WG


-----Original Message-----
From: Tyler Silcox [mailto:[EMAIL PROTECTED]
Sent: 05 March 2003 17:00
To: CF-Talk
Subject: import JAR files inline?


Can I directly import JAR files from within ColdFusion code on CFMX?  Let's
say I want to import a Java imaging library from the same directory my file
is on, and I just want to import the Jar file, can I?

This is what I want to do:

!! IMPORT "ij.jar" (somehow)

<cfobject type="java" name="objImagePlus" class="ij.ImagePlus"
action="create">
<cfobject type="java" name="objOpener" class="ij.io.Opener" action="create">

<cfscript>
objImage = objOpener.openImage(variables.Section.ImageDir &
MyFile.ServerFile);
stInfo.Width = objImage.getWidth();
stInfo.Height = objImage.getHeight();
</cfscript>

This is on a shared server, so I can't really put it in the WEB-INF/lib
directory, and I was somewhat sure that you could do this on CFMX.

Tyler Silcox
email | [EMAIL PROTECTED]

Thanks to Benoit and www.benorama.com for the snippet...



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to