> Thanks very much Paul and Tim,
>
> I have added a class path in CF Admin to
> C:\j2sdk1.4.1_01\jre\lib\ext which is where my jar file lives
> (called myJarFile-1_0_1.jar). I know that the file contains a
> class called Agent, so I've got this code:
>
> dcAgent = createObject("java","myJarFile-1_0_1.Agent");
>
> But I get the reponse: "Class not found"
>
> Any ideas?
Get the jar file out...
Open in it your favourite unzipping utility (don't unzip it, just look at
the archive)
Find the file Agent.class and check the path it is in:
File: Agent.class
Path: com.somewhere.namespace
The path is the namespace
The filename minus the .class extension is the object name so therefore:
com.somewhere.namespace.Agent
Will load up the object:
dcAgent = createObject("java","com.somewhere.namespace.Agent");
NOTE: Case sensitivity is very important in Java. You can have three
classes called the same thing in Java (although not in windows) like
abc.class, ABC.class and aBc.class and these are different to Java.
Paul
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]