Kris, Dan,

Thanks for feedback. I'm understanding that the javaloader.cfc and the
classloader .jar should be in the working directory of the script, right?

I have classloader-20070406174551.jar, JavaLoader.cfc, and
metadata-extractor-2.3.1.jar all in the same directory as the script and I'm
using the following code to use them:

             photoFile = createObject("java","java.io.File").init(photo);
             //set the path
             paths = ArrayNew(1);
             paths[1] = expandPath("metadata-extractor-2.3.1.jar");
             //create the loader
             loader = createObject("component", "JavaLoader").init(paths);
             //create the JpegMetadataReader instace 
             JpegMetadataReader =
loader.create("com.drew.imaging.jpeg.JpegMetadataReader");
             //Read jpg file
             JpegMetadata = JpegMetadataReader.readMetadata(photoFile);
             //get directory iterator
             JpegDirectories = jpegMetadata.getDirectoryIterator();
 
Does the classloader jar need to be in the lib/ext dirs or soemthing? I've
tried a few different things on two different servers.

Regards,
 

-----Original Message-----
From: Mark Mandel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 13, 2007 4:00 PM
To: CF-Talk
Subject: Re: java classloader


Dan -

You shouldn't move the JavaLoader .jar files around, they should stay in the
way they were originally downloaded in.

Mark

On 9/14/07, Kris Jones <[EMAIL PROTECTED]> wrote:
> Did the java classpath on the machine change?
>
> > I'm using the javaclass loader to load a meta-data reader for some
jpegs.
> > It seems no matter where I put the .jar for the class loader I get 
> > the following exception:
> >
> > message: com.compoundtheory.classloader.NetworkClassLoader
> > type: java.lang.ClassNotFoundException
> >
> > I am trying to do it like this page describes:
> > http://www.leavethatthingalone.com/blog/index.cfm/2006/5/16/Using-Co
> > ldFusion -to-Read-EXIF-Information-from-JPEGs
> >
> > the line throwing the exception:
> > networkClassLoaderClass =
> > getServerURLClassLoader().loadClass("com.compoundtheory.classloader.
> > NetworkC
> > lassLoader");
> >
> > I have the classloader-20070406174551.jar in the same directory as 
> > the script.  Whats really wierd is this was working and stopped!  
> > I'm banging my head against the desk on this one...
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288480
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to