Login  Register

Re: placement of non-plugin utility classes

Posted by ctrueden on Jul 11, 2006; 5:42pm
URL: http://imagej.273.s1.nabble.com/placement-of-non-plugin-utility-classes-tp3702100p3702104.html

Hi Ben,

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.

-Curtis

On 7/11/06, Ben Tupper <[hidden email]> wrote:

>
> Hello,
>
> I am trying to reconcile what I learned in a recent Java training course
> with what I am learning about ImageJ.  One piece that is quite fuzzy in
> my mind is the placement of my own non-plugin utility classes.  Suppose
> I had a utility class, "MyArrayUtilityClass",that works with arrays in
> some generic way (other examples might be string or file utilities)  .
>   Where in the world do I put it so I can import it for my own ImageJ
> plugins.  Literally, where do I place the class relative to the ImageJ
> application and what does the import statement look like?
>
> Cheers,
> Ben
>