[josm-dev] Plugins that depend on external libraries..
Henrik Niehaus
henrik.niehaus at gmx.de
Wed Apr 15 17:49:56 BST 2009
Mattias Dalkvist schrieb:
> Hi
> I'm trying to make a plugin of my geotiff code, but I can't get the
> dependencies to work.
> The plugin it self works fine, that is when josm is launched from
> eclipse, and the dependencies are added to the eclipse projects
> classpath.
>
> Do anyone have any experience of external .jar dependencies for plugins?
> Or anyone with pointers generally?
>
> The libraries are mostly from the geotools library, including the jai libraries.
> it is the later that gives me a error that I can't find a way to fix,
> googeling gives that the error is connected to the classpath and when
> the libraries are loaded.
>
> Error output:
> java.lang.IllegalArgumentException: ImageRead: No OperationDescriptor
> is registered in the current operation registry under this name.
> at javax.media.jai.JAI.createNS(JAI.java:1070)
> at javax.media.jai.JAI.create(JAI.java:973)
> at org.geotools.gce.geotiff.GeoTiffReader.read(GeoTiffReader.java:426)
> ...
>
If the licenses of the used libs allow it, you can unzip them and
include them in the plugin jar. You can do that with an ant task.
Otherwise you could write a custom classloader, which loads the libs.
More information about the josm-dev
mailing list