you sure your casing is correct?

its not agent?



At 12:23 24/01/2003 +0000, you wrote:
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?

Thanks again, Douglas


-----Original Message-----
From: Tim Blair [mailto:[EMAIL PROTECTED]]
Sent: 24 January 2003 12:15
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] Java in CF



> I'm hunting for documentation on using a .jar file in my
> ColdFusion. I tried using createObject and call the name of
> the file, but it didn't work. Does anyone know what I need to do?

I would guess that as long as the .jar is in the classpath somewhere,
then you just use createobject() or similar on a class contained in the
jar file. The jar file is basically a zip file of a load of java
classes, so you can't create an instance of that...

E.g. testjar.jar is in the classpath and contains:
- testclass.class
- anotherclass.class

Then the following should work fine:

<cfscript>
testobj = createobject("java", "testclass");
</cfscript>

Disclaimer: all untested and purely off the top of my head whilst in the
middle of doing something else... :o)

Tim.

-------------------------------------------------------
OUR NEW SITE IS NOW LIVE
Visit our new website at http://www.rawnet.com/ and
race around the beautiful Bracknell streets at
http://xmas.rawnet.com/
-------------------------------------------------------
Tim Blair
Web Application Engineer, Rawnet Limited
Direct Phone : +44 (0) 1344 393 441
Switchboard : +44 (0) 1344 393 040
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential. If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------




--
** 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]



--
** 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]

--
** 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]

Reply via email to