If you want to call a static method, just do it directly on the
createObject() result, much like you'd call the init() method to
actually construct an object instance.

<cfset num = createObject("java", "java.lang.Math").ceil(num) />

You can create as many objects as you want, and pass information into
them at will.  Keep in mind that objects are pass-by-reference, so if
you pass the same object (A) to two other objects (B & C), there's
still only a single A object that is shared between both B and C.

cheers,
barneyb

On Wed, 15 Sep 2004 12:45:49 -0400, Steve Dworman
<[EMAIL PROTECTED]> wrote:
> here's the deal...
>
> i can, obviously, create an object for any class.
>
> i can also call any method that looks like "public void addDir(java.io.File dir)" and of course i have to something like createObject( "java" ,  "java.io.File" ).init(tempdir),
>
> how do i access a method like "public static void main(java.lang.String[] args)"?
>
> furthermore, how can i create multiple objects and make results accessible between them?
>

--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to