Matt,
Do you know why you have to be "explicit" on declaring the class as
public/private...CFMX doesnt
take default.
eg.. CFMX doesnt like
class ChkStrings{}
it should be
public class ChkStrings{}
The Java construct works fine without an explicit declaration of
"public" and u are able to
instanciate the class object.. call methods and whatever.. but..
CFMX doesnt like this. CFMX
creates the object but doesnt realize any public methods in the
class.
Joe
----- Original Message -----
From: "Matt Liotta" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, September 08, 2002 1:09 PM
Subject: RE: CFObject in CFMX
> CFMX can be configured to have a hot load directory that detects changes
> to Java classes and reloads them. You have to change an XML
> configuration file for this, so check the documentation.
>
> Matt Liotta
> President & CEO
> Montara Software, Inc.
> http://www.montarasoftware.com/
> 888-408-0900 x901
>
> > -----Original Message-----
> > From: Joe Eugene [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, September 08, 2002 9:14 AM
> > To: CF-Talk
> > Subject: RE: CFObject in CFMX
> >
> > Sean,
> > If i am right ... obj.init() simply does an instanciation..ie
> calls
> > the
> > constructor. I dont have a constructor.. so the default
> constructor
> > should be called right?.. so obj.init() is needed only when you
> have
> > to instanciate the object and set variables too. some like...
> >
> > Myclass mc = new Myclass(); // default
> > Myclass mc = new Myclass(10,20); // same as obj.init(10,20)
> >
> > Anyways i finally found out that you had to "explicitly" declare
> the
> > class
> > as "public" to get this working...
> > so "class chkString{}" should be "puiblic class chkString{}"...
> i
> > know i
> > tried this
> > earlier.. but one BIG DEBUG PROBLEM.. after CFMX loads the class
> the
> > first
> > time
> > and you replace the class with a new class...CFMX keeps the OLD
> > class in
> > memory.. so basically you have restart the CFAS...
> > Is there any work around this... i mean you can't restart the
> server
> > in the
> > middle of production....Appreciate your help.
> >
> > Thanks
> > Joe
> > Certified Advanced ColdFusion Developer
> > [EMAIL PROTECTED]
> >
> >
> > -----Original Message-----
> > From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, September 08, 2002 10:18 AM
> > To: CF-Talk
> > Subject: Re: CFObject in CFMX
> >
> >
> > On Saturday, September 7, 2002, at 09:08 , Joe Eugene wrote:
> > > I am trying to invoke a java class with CFobject and CFMX doesnt
> > > like something...
> > >
> > > <cfobject action="Create" type="Java" class="chkString" name="obj">
> > > <cfset x=obj.getString()>
> > >
> > > it creates the object "obj" but says there is an error on
> > "obj.getString(
> > > )"
> >
> > Use <cfdump var="#obj#"> to see exactly what you created - it will
> dump
> > out a Java object will all the methods.
> >
> > It doesn't look like you're calling init() either - CF requires that
> you
> > call init() after creating the object so that it is correctly
> constructed.
> > I think your code should read:
> >
> > <cfobject action="Create" type="Java" class="chkString" name="obj">
> > <cfset obj.init()>
> > <cfset x=obj.getString()>
> >
> > Sean A Corfield -- http://www.corfield.org/blog/
> >
> > "If you're not annoying somebody, you're not really alive."
> > -- Margaret Atwood
> >
> >
> >
>
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists