Login  Register

Re: placement of non-plugin utility classes

Posted by Wayne Rasband on Jul 11, 2006; 6:05pm
URL: http://imagej.273.s1.nabble.com/placement-of-non-plugin-utility-classes-tp3702100p3702105.html

> If you have a utility class that you want to access from a single
> plugin,
> you can package with that plugin in a JAR file. If more than one of
> your
> plugins needs it, you can place it in the jre/lib/ext on Windows or
> Linux,
> or /Library/Java/Extensions on Mac OS X. Then you should be able to
> access
> it as normal (if it is packageless, without an import statement,
> otherwise
> importing the proper package).
>
> Alternately, you might be able to use ImageJ's PluginClassLoader, but I
> haven't experimented with that much.

ImageJ's PluginClassLoader automatically searches JAR files in the
plugins folder or immediate subfolders. Utility classes should always
be in a package to avoid class name conflicts.

-wayne