Handling static methods is simple:
X = createObject("java", "someclass");
X.staticMethod(1, 2);
Note that I did not invoke the init method (constructor alias).
As for sharing the results of methods between objects... You would handle
that just as you might expect. Save the return value of a method to a CFML
variable and pass it as the argument to method in another object.
You might refer to this content:
http://www.sys-con.com/coldfusion/article.cfm?id=250
rish
________________________________
From: Steve Dworman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 15, 2004 11:46 AM
To: CF-Talk
Subject: cfobject and java
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?
________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

