the following is my code to load a mib file. this works.
<cfscript>
mib = createobject("java", "net.percederberg.mibble.MibLoader");
nfo = createobject("java", "net.percederberg.mibble.Mib");
tempdir="my path here";
tempvar = createObject( "java" , "java.io.File" ).init(tempdir);
mib.addDir(tempvar);
temp = mib.load("sonus.mib");
</cfscript>
You'll notice I create another object "nfo" which i need to access. This is the mib class http://www.mibble.org/doc/release/api/net/percederberg/mibble/Mib.html
I'm trying to call something simple like the getLoader or getFile method.
if i add a line like "blah = nfo.getFile();" then i get an error such as
net.percederberg.mibble.Mib
The error occurred in : line 25
23 : mib.addDir(tempvar);
24 : temp = mib.load("sonus.mib");
25 : blah = nfo.getFile();
26 : </cfscript>
27 :
>Steve,
>
>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]

