Login  Register

Re: ImageJ startup and CLASSPATH

Posted by Wayne Rasband on Nov 03, 2005; 3:33pm
URL: http://imagej.273.s1.nabble.com/ImageJ-startup-and-CLASSPATH-tp3704542p3704543.html

> We are working on a DICOM plugin for ImageJ which requires
> some additional libraries (jar-files) in the ImageJ
> CLASSPATH.
>
> Most of the other plugins who need additional libraries,
> equip their plugins with a own ImageJ startup-script which
> sets this CLASSPATH. The problem is, that if you install
> some of these plugins, you have to edit the startup-script
> to add all nessessary files to the CLASSPATH.
>
> To make the CLASSPATH handling a bit easier, we wrote a
> small "runImagej.jar" file which starts the ImageJ program
> with all library files in the "lib/" directory in its
> CLASSPATH.
>
> I Just wanted to ask if you know any better solution to
> solve this problem, or if you think this small starter
> application is a good way to solve this problem.

There is no need for another starter application. Try adding the JAR
files to the ImageJ plugins directory, or sub-directory. ImageJ's
PluginClassLoader can load classes from JAR files located in the
plugins directory. If that doesn't work, try adding the JAR files to
Java extension directory, ..\ImageJ\jre\lib\ext on Windows and Linux,
or /System/Library/Java/Extensions on Mac OS X.

-wayne