call("class.method", arg1, arg2, ...) in a macro?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

call("class.method", arg1, arg2, ...) in a macro?

Bill Mohler
Can

    call("class.method", arg1, arg2, ...)

call a method in a class that is in a jar file in the plugins
directory?  Or does the class file need to be at the root of the plugins
directory and unjarred to be reached by such a call command in a macro?

Thanks,
Bill
--
 
Reply | Threaded
Open this post in threaded view
|

Re: call("class.method", arg1, arg2, ...) in a macro?

dscho
Hi,

On Wed, 23 Dec 2009, Bill Mohler wrote:

> Can
>
>    call("class.method", arg1, arg2, ...)
>
> call a method in a class that is in a jar file in the plugins directory?  
> Or does the class file need to be at the root of the plugins directory
> and unjarred to be reached by such a call command in a macro?

ImageJ uses its plugin class loader to load the class, so it can be in
any .jar file in the plugins/ directory, as well as anywhere in the
classpath.

Note, however, that it will use the first implementation it finds.  So if
you have an obsolete .jar file early in the classpath with the class you
want to call, that one will be used.

Hth,
Johannes